Asp tutorial. net implements resumable upload of Files
1. The resumable upload function is managed by the recipient.
2. Each time a file is interrupted, a project object will be created to be resumed, and relevant information will be encapsulated using the resumedfileitem class.
/// <Summary>
/// Items that may be resumed.
/// </Summary>
Public class resumedfileitem
{
# Region senderid
Private string senderid;
/// <Summary>
/// The id of the sender.
/// </Summary>
Public string senderid
{
Get {return senderid ;}
Set {senderid = value ;}
}
# Endregion
# Region originfilepath
Private string originfilepath;
/// <Summary>
/// The full path of the file sent by the sender.
/// </Summary>
Public string originfilepath
{
Get {return originfilepath ;}
Set {originfilepath = value ;}
}
# Endregion
# Region originfilesize
Private long originfilesize = 0;
/// <Summary>
/// Size of the file sent by the sender.
/// </Summary>
Public long originfilesize
{
Get {return originfilesize ;}
Set {originfilesize = value ;}
}
# Endregion
# Region originfilelastupdatetime
Private datetime originfilelastupdatetime;
/// <Summary>
/// The last modification date of the file sent by the sender.
/// </Summary>
Public datetime originfilelastupdatetime
{
Get {return originfilelastupdatetime ;}
Set {originfilelastupdatetime = value ;}
}
# Endregion
# Region localtempfilesavepath
Private string localtempfilesavepath;
/// <Summary>
/// Storage path of the received temporary file
/// </Summary>
Public string localtempfilesavepath
{
Get {return localtempfilesavepath ;}
Set {localtempfilesavepath = value ;}
}
# Endregion
# Region localfilesavepath
Private string localfilesavepath;
/// <Summary>
/// The path of the received File
/// </Summary>
Public string localfilesavepath
{
Get {return localfilesavepath ;}
Set {localfilesavepath = value ;}
}
# Endregion
# Region receivedcount
Private long receivedcount = 0;
/// <Summary>
/// The number of bytes received.
/// </Summary>
Public long receivedcount
{
Get {return receivedcount ;}
Set {receivedcount = value ;}
}
# Endregion
# Region disrupttedtime
Private datetime disrupttedtime = datetime. now;
/// <Summary>
/// Receipt interruption time.
/// </Summary>
Public datetime disrupttedtime
{
Get {return disrupttedtime ;}
Set {disrupttedtime = value ;}
}
# Endregion
}
1 2 3