I have a page on my site where I allow users to upload files. In addition to the actual file, the user is required to enter data about the file (keyword(s), description, etc). The page that I have now is 100% PHP and does almost everything that I need - data validation, SQL INSERT, file upload, etc. However, my problem with the current setup is this: I have imposed a 5MB limit on the uploaded files. Unfortunately, PHP does not have access to the local file system, so it is unable to check the file size before the upload. PHP has to upload the file to the server, then determine if it's too large. If a user selects a 100MB file, this entire file has to get uploaded before the user knows that it's too large (this usually times out anyway, but you see my point).
After doing some research, it seems like I'll have to use another langauge (Flash in my case) to get the file size before the upload. Since I'm not a Flash programmer, this has been a little more challenging than I had anticipated. What I would like to do is keep the keyword and description fields as regular HTML <input>s and only have the file selection be in Flash. I found a few examples of this integration, but when I try to do the same with my page, the file does not get uploaded.
Does anyone have any experience with this scenario?
Thanks!!