Allows aspx pages to accept files transmitted from HTML and asp pages
Source: Internet
Author: User
Aspx accepts files on the aspx page. You can use HtmlInputFile. However, if you want to accept files post on the Html page
It is not easy to do. I follow the asp method as follows. I tested it myself and shared it with you. You can restrict it.
File content, type, size, custom storage location, in congfig. xml
Html page content: (from FCKeditor)
<Html>
<Head>
<Title> FCKeditor-Uploaders Tests </title>
<Script language = "javascript">
Function SendFile ()
{
Var sUploaderUrl = cmbUploaderUrl. value;
If (sUploaderUrl. length = 0)
SUploaderUrl = txtCustomUrl. value;
If (sUploaderUrl. length = 0)
{
Alert ('Please provide your m url or select a default one ');
Return;
}
EURL. innerHTML = sUploaderUrl;
TxtUrl. value = '';
FrmUpload. action = sUploaderUrl;
FrmUpload. submit ();
}
Function OnUploadCompleted (errorNumber, fileUrl, fileName, customMsg)
{
Switch (errorNumber)
{
Case 0: // No errors
TxtUrl. value = fileUrl;
Alert ('file uploaded with no errors ');
Break;
Case 1: // Custom error
Alert (customMsg );
Break;
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