AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Funciones específicas de la Web / Funciones de carga de archivos (Upload)
  • Adding the image of a contact
UploadCopyFile (Example)
Adding the image of a contact
WEBDEV - Código ServidorPHPAjax
sImagePath is string
PageToFile(PAGE_New_Contact, File_Contact)
 
// Manage the image of the contact
IF EDT_IMAGE <> "" THEN
sImagePath = UploadCopyFile(EDT_IMAGE, fDataDir(), "")
IF sImagePath = "" THEN
 Error("Error while transferring the image to the server. Process canceled.")
 RETURN
ELSE
 IF NOT HLinkMemo(File_Contact, Photo, ...
CompleteDir(fDataDir()) + sImagePath) THEN
 Error(HErrorInfo())
 RETURN
 END
END
END
 
IF HAdd(File_Contact) = False THEN
Error(HErrorInfo())
END
 
// Delete the uploaded file
fDelete(CompleteDir(fDataDir()) + sImagePath)
PageDisplay(PAGE_List_of_Contacts)
Versión mínima requerida
  • Versión 9
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/05/2022

Señalar un error o enviar una sugerencia | Ayuda local