how to restrict to copy file to folder?

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
venkatesh
User
Posts: 43

how to restrict to copy file to folder?

Post by venkatesh »

I want to use input type file option but I do not want to copy selected file into folder or any where. I just want to save the file name in database.
I commented move_uploaded_file() in ew_MoveUploadFile() function in phphfn10.php but it doesnot work.


mobhar
User
Posts: 11905

Post by mobhar »

You should modify the code of "ew_RenderUploadField" function in "phpfn10.php" file. This is the main function how the upload process in action.


danielc
User
Posts: 1599

Post by danielc »

You may use "unlink" in Row_Inserted server event to remove the file. See php.net/manual/en/function.unlink.php.


venkatesh
User
Posts: 43

Post by venkatesh »

Thanks for reply.
I cannot use unlink because users don't have permission to delete a file.
Due to some UI design issues in IE with v10 I was moved to v8. In v8, "ew_RenderUploadField" function is not available.


mobhar
User
Posts: 11905

Post by mobhar »

In v8, you should modify the code of "SaveToFile" or "ResizeAndSaveToFile" function that belongs to "cUpload" class in the "phpfn8.php" file.


Post Reply