Asp.net implements resumable upload of files (1/3)

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.