Hi I have a form which will be used by members of the site to post up ads... and I want them to be able to attach files... however I am trying to figure out how I should implement the uploading system... Should I put the uploader right on the posting form... the uploader is an ajax uploader.. no need to refresh. Or should I put it on the page after the user submits the post form (so we can be use the post will actually be added to db). Right now I am actually letting them upload before they submit the form and putting all the files in a temp directory (which a script will automatically purge every few hours) and then when they click submit and everything checks out; I move the file to a permanent dir. This doesnt seem very efficent... so any suggestions or ideas would be welcome! Also; is there ANY way possible to check the size of a file before the file is completely uploaded to the server? I see facebook does this with its video uploads... java applet?
I would include the posting in the ajax upload script. Just add a handler for posting the message to you rajax uploader. As for cheking the file size: afaik you need to fully upload, OR find a java aplet, as you mentioned.