User selects the file to be uploaded and based on file's info like file mime-type,operating system type have to get properties associated with this kind of file and display these properties to user in a dialog which prompts user if he wants to upload the file. If user clicks upload button on the the file is uploaded otherwise not. Now what should I do upload file twice once to find mime-type, operating system type and get properties of this type of file from my server and then when user clicks upload button again upload the file. Please suggest better apporach.
Thanks with regards
Joined: Mar 22, 2005
You don't need to upload it twice. You can keep the file on the server, and in case the user decides that it is the one he wants to upload, use the file that's already there. In this case you need to periodically remove unused uploaded files from the server.
I wouldn't try to keep the entire file in memory. Write it to disk but keep the file path and name in session.
Joined: Mar 24, 2005
You should find a solution which requires NO file transfer for the purpose of obtaining the file metadata (never mind TWO file transfers). If you require the user to upload a file in order to be able to decide if he wants to upload a file, not only is your architecture completely flawed but the application is useless for large files.
Joined: Apr 01, 2007
Thanks to you all