What info is included with file on upload via http?
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 Modi开发者_如何学Cfied and Created get reset to the upload time or are they preserved?
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:
alt text http://darrenjohnstone.net/wp-content/uploads/2008/07/upload_sequence.png
(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).
精彩评论