UseLastDateModified Property

Object: SoftArtisans.FileUp
Syntax: UseDateLastModified
Type: Boolean
Read/Write: Read/Write
Description:

If the "X-Last-Modified" header is sent in a request, and FileUp's UseDateLastModifiedproperty is set to True, FileUp will preserve the last modification date of the file transmitted by the user.

Use one of the following properties to return the date:

The file on the server will have the same creation and modification date as the user's original file. This only works if the client upload software sends this information.

Neither Netscape Navigator nor Microsoft Internet Explorer send the file's modification date. SoftArtisans XFile transmits this information by inserting the "X-Last-Modified" header in the Request, when XFile's [XFRequest].UseXLastModified property is set to True.

Sending the needed header:

If you are using a different upload client, use the following header to send the Last Modified date:

X-Last-Modified: Fri Dec 04 10:29:02 GMT 1998

Which can be defined as follows:

date-time = day date time 4DIGIT ; Dow Mmm dd hh:mm:ss zzz yyyy day = "Mon" /
            "Tue" / "Wed" / "Thu" / "Fri" / "Sat" / "Sun" date = month 2DIGIT ; month day month
            = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / "Jul" / "Aug" / "Sep" / "Oct"
            / "Nov" / "Dec" time = hour zone ; ANSI hour = 2DIGIT ":" 2DIGIT ":" 2DIGIT ; 00:00:00
            - 23:59:59 zone = "UT" / "GMT" ; Universal Time 

The file modification date is always sent in GMT format to account for time zone differences between the browser and server.

Examples:

ASP <%
'--- Instantiate FileUp
Set fileUpload = Server.CreateObject("SoftArtisans.FileUp")

'--- Set cache/default save location
fileUpload.Path = "C:\temp"

'--- Set UseLastDateModified to True
fileUpload.UseLastDateModified = True

'--- Save upload
fileUpload.Save
%>
C# //--- Instantiate FileUp
FileUp fileUpload = new FileUp(Context);

//--- Set cache/default save location
fileUpload.Path = @"C:\temp";

//--- Set UseLastDateModified to true
fileUpload.UseLastDateModified = true;

//--- Save upload
fileUpload.Save();
VB.NET '--- Instantiate FileUp
Dim fileUpload As New FileUp(Context);

'--- Set cache/default save location
fileUpload.Path = "C:\temp"

'--- Set UseLastDateModified to True
fileUpload.UseLastDateModified = True

'--- Save upload
fileUpload.Save()

Copyright © 2010 SoftArtisans, Inc. All rights reserved.