If I'm uploading via http, do I have to wait till the file is transferred to determine the size? Also, what other info is available that would be available on the local copy? Do Last Modified and Created get reset to the upload time or are they preserved?
+3
A:
Your post made me curious, so I did some research. From an application perspective (If I understand RFC 1867 correctly - I just scanned through it to find the vital information), you'll get:
- Form field name
- Filename/path
- Content type
Then your application server will add the file, file size, set the modified/accessed date to the current date/time (when the file was received). The created date seems to come with the file (I just ran a test on ColdFusion/Windows). I found this image quite informative:
(image credit: Darren Johnstone)
If you want more data about the local file (on the client's machine) before uploading, then you'll probably have to go with a Flash solution (or some other browser plug-in solution).
Gert G
2010-06-15 01:11:18