PDA

View Full Version : [CLOSED] [#539] Multiupload works on localhost?



mapperez
Sep 04, 2014, 7:52 PM
This code in my project. Running does nothing




<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<%@ Import Namespace="Ext.Net" %>


<!DOCTYPE html>

<html>
<head id="Head1" runat="server">
<title>Simple MultiUpload - Ext.NET Examples</title>

<script runat="server">
protected void MultiUpload1_FileUpload(object sender, FileUploadEventArgs e)
{
System.Threading.Thread.Sleep(3000); // for testing purposing only
X.Msg.Notify("File is uploaded", "Name: " + e.FileName).Show();
}
</script>
<script type="text/javascript">
var uploadError = function(item, file, errorCode, message) {
alert("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
};

var fileSelectionError = function(item, file, errorCode, message) {
alert("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
};
</script>
</head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" DisableViewState="false" />

<h1>Simple MultiUpload</h1>

<ext:MultiUpload
ID="MultiUpload1"
runat="server"
OnFileUpload="MultiUpload1_FileUpload"
AutoStartUpload="true"
FileDropAnywhere="true"
FileSizeLimit="15 MB"
FileTypes="*.*"
FileTypesDescription="All Files"
FileUploadLimit="100"
FileQueueLimit="0">
<Listeners>
<UploadStart Handler="Ext.Msg.wait('Uploading...');" />
<UploadError Fn="uploadError" />
<FileSelectionError Fn="fileSelectionError" />
<UploadComplete Handler="Ext.Msg.hide();" />
</Listeners>
</ext:MultiUpload>

</form>
</body>
</html>


The code run here http://190.98.213.21/spt/FileUploap.aspx no work

Daniil
Sep 05, 2014, 8:25 AM
Hi @mapperez,

I've just tried your test case without no changes and it appears to be working well for me. Tested with the latest Ext.NET from SVN and FireFox.


Running does nothing

Is there any JavaScript error?

mapperez
Sep 05, 2014, 3:37 PM
I have Visual Studio 2008 and Ext.net 2.5 with framework 3.5.

If you run this does nothing http://190.98.213.21/spt/FileUploap.aspx

Daniil
Sep 05, 2014, 4:46 PM
I see the following error in FireFox FireBug.


"NetworkError: 404 Not Found - http://190.98.213.21/spt/WebResource.axd?d=M7UPVQXrVZcTAIIegA9OBgW9BZOP4l4r 6j9FBgosWeyHZvTsKw14UXUxgZoGhIRtFkccBw2-gy7N4oBDp_z6HNR-5QXfY4-uFJEK6UgjYW25R1gxg7wW-y-m1rPxTqm12mzVj7hwpo8e6wxdP1Gh_esYlqlh5sTmZtz2SI90-q81&t=635295492380000000&preventswfcaching=1409931896666"

It is a flash file URL which is required for a MultiUpload to be working.

Daniil
Sep 05, 2014, 5:15 PM
As a workaround we can recommend to set this for the MultiUpload:

FlashUrl="http://speed.ext.net/ext.net/2.5.2/ux/multiupload/swfupload/swfupload.swf"
or enable Ext.NET resource handler as I suggested here, check these setting in the Web.config:

<system.web>
<httpHandlers>
<add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false"/>
</httpHandlers>
</system.web>

<system.webServer>
<handlers>
<add name="DirectRequestHandler" verb="*" path="*/ext.axd" preCondition="integratedMode" type="Ext.Net.ResourceHandler"/>
</handlers>
</system.webServer>

Daniil
Sep 05, 2014, 5:39 PM
I've reproduced the problem locally and investigating a possible fix.

Created an Issue.
https://github.com/extnet/Ext.NET/issues/539

Daniil
Sep 05, 2014, 5:50 PM
It has been fixed in the SVN trunk, revision #5954. The fix will go to the v2.5.3 release.

Thank you for the report.