Home     Products      Support      Corporate     Sign In 
Support Knowledge Base, Article 783
Product
XFile
Version
prior to 2.0
Title
Unexpected behavior when retrieving "Date Last Modified" information on an uploaded file. (XFile, FileUp)
Problem

In versions of XFile prior to version 2.0, setting the UseXLastModifed property to "True" did not result in the creation of the "X-Last-Modified" Request Header as expected. Rather, it appended a "last modified date" parameter to the Content-Disposition header.

   Content-Disposition: form-data; name="FileName1"; filename="C:\testfile.txt"; last modified date="1/9/2004 12:57:10 PM"

The proper format of a header including the "Date Last Modified" file information should be:

   X-Last-Modified: 1/9/2004 12:57:10 PM

As a result, if an upload request is posted with a 1.x release of XFile, FileUp will not be able to parse the "Date Last Modified" information for uploaded files. FileUp's DateLastModified property will be ineffective, but this will not cause scripts to error.

Solution

In order for the DateLastModified property of FileUp to be effective when XFile is being used as the client, it is necessary to upgrade XFile to version 2.0 or higher. Version 2.0 and higher will properly create an "X-Last-Modified" header in the upload request.

If, as a work-around, you have developed your own code to parse the "Date Last Modified" information out of the Content-Disposition header, you should be aware that this information will no longer appear in the Content-Disposition header and will only appear as the X-Last-Modified header, as shown above.


Related Links:

Created : 1/13/2004 9:50:19 AM (last modified : 1/13/2004 9:50:19 AM)
Rate this article!
Comments