Jump to content

when does file upload occur?


ricmetal

Recommended Posts

hey

i'm making an addon for opencart so people can upload their own digital products-

i am trying to make a secure thing with error handling so there's a few steps like checking duplicate file names, file extension, etc.

but i'm wondering: when does the actual upload occur?

 

Link to comment
https://forums.phpfreaks.com/topic/215556-when-does-file-upload-occur/
Share on other sites

When a file is submitted to a php page using the standard php file input it is uploaded into a temporary folder.  From there it is then possible to check the name etc. of the uploaded file and move it to a more permanent place on your web server.

Since PHP version 5, temporary files are only held in the temporary directory for the length of the execution of the script - they are removed when the script completes executing.  In PHP < 5, the files are kept until the operating system decides to do a cleanup.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.