PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Adding the image of a contact
UploadCopyFile (Example)
Adding the image of a contact
WEBDEV - Server codePHPAjax
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)
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment