Page 1 of 1

how to restrict to copy file to folder?

Posted: Mon Sep 16, 2013 6:30 pm
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.


Re: how to restrict to copy file to folder?

Posted: Tue Sep 17, 2013 10:04 am
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.


Re: how to restrict to copy file to folder?

Posted: Tue Sep 17, 2013 12:19 pm
by danielc

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


Re: how to restrict to copy file to folder?

Posted: Tue Sep 17, 2013 1:22 pm
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.


Re: how to restrict to copy file to folder?

Posted: Tue Sep 17, 2013 3:24 pm
by mobhar

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