The script I’ve installed (successfully) allows the user to drag/drop, or choose a file, to upload.
Can you provide some guidance, maybe an example, of how I can add a feature where the user must agree to the Terms before the dragged/dropped/chosen file can be uploaded? Here’s my current code:
Your uploading system is very prone to exploits. Allowing the user to choose what they can name the file is very dangerous and should be avoided at all times.
Thanks for the replies. “Is this uploading the file as soon as it is drag/dropped?” Yes.
I’ve attached the files you requested dropzone.js and dropzone.min.js. They had too many characters for pasting the code to this thread, apparently.
Also, any help with what I could do to avoid allowing the user to “choose what they can name the file”, will be appreciated.
store seperate path and name in a database and use the name to display the filename on a webpage and set the appropriate header for downloads. use an ID anywhere else.
As for the question, I’d probably have a tick-box on the screen that they must tick to indicate acceptance, and only make the upload script active once it’s ticked.
I’m not big on JavaScript, but I’m sure there’s a way for the upload code to check whether or not a tick-box is checked before continuing with the upload.