Work on FileUpload -- added cookies on callback

This commit is contained in:
Rick Falkvinge
2017-09-27 08:44:19 +02:00
parent 501118d06f
commit f5ede68d0f
2 changed files with 10 additions and 1 deletions
+9 -1
View File
@@ -1,4 +1,5 @@
<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="FileUpload.ascx.cs" Inherits="Swarmops.Controls.Base.FileUpload" %>
<%@ Import Namespace="System.Net" %>
<asp:HiddenField runat="server" ID="HiddenGuid"/>
@@ -25,7 +26,7 @@
<% if (!String.IsNullOrEmpty(this.ClientUploadCompleteCallback))
{ %>
<%= this.ClientUploadCompleteCallback %>();
<%= this.ClientUploadCompleteCallback %>("<%= GuidString%>", "<%= Cookie%>");
<% } %>
@@ -50,6 +51,13 @@
$('#<%=this.ClientID %>_DivProgressUpload').progressbar({ value: 0 }); // reset in case of previous uploads on this page
$('#<%=this.ClientID %>_DivProgressUpload').fadeIn();
data.submit();
<% if (!String.IsNullOrEmpty(this.ClientUploadStartedCallback))
{ %>
<%= this.ClientUploadStartedCallback %>("<%= GuidString%>", "<%= Cookie%>");
<% } %>
}
});
+1
View File
@@ -36,6 +36,7 @@ namespace Swarmops.Controls.Base
public bool HideTrigger { get; set; }
public string ClientUploadCompleteCallback { get; set; }
public string ClientUploadStartedCallback { get; set; }
public string Cookie { get; set; }
protected void Page_Init (object sender, EventArgs e)
{