Dmitry.Obukhov wrote:Hello Eric,
Quote:When using this new .js the triple size upload problem is gone, but the javascript events for afterUpload and afterPackageUpload will no longer fire.
I tried to reproduce this problem with new js file and using AfterUpload event. However, I did not get the same result as you did. AfterUpload event worked okay. Could you provide me with your sample where this problem occurs, please?
Okay, here it is:
UploadHandler.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UploadHandler.aspx.cs"
Inherits="vyRole.App.Views.WblEdit.UploadHandler" %>
<%@ Register Assembly="Aurigma.ImageUploaderFlash" Namespace="Aurigma.Uploader" TagPrefix="aur" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<script>
function afterPackageUploadHandler(fileIndex, response)
{
alert('afterPackageUploadHandler');
}
function afterUploadHandler(response)
{
alert('afterUploadHandler');
}
</script>
<script src="/Scripts/Common/mooCore.js"></script>
<script src="/Scripts/Common/aurigma.imageuploaderflash.js"></script>
</head>
<body>
<aur:ImageUploaderFlash ID="_uploader" runat="server" Width="710px" Height="480px"
LicenseKey="74010-4F50C-00000-03C89-E3849">
</aur:ImageUploaderFlash>
</body>
UploadHandler.aspx.cs:
using Aurigma.Uploader;
namespace vyRole.App.Views.WblEdit
{
public partial class UploadHandler : ViewPage
{
protected override void OnPreInit(System.EventArgs e)
{
_uploader.UploadSettings.ActionUrl = 'Some link that is being called, file is saved here okay';
_uploader.Restrictions.FileFilters = "[[Images (*.jpg; *.jpeg; *.jpe; *.png; *.gif)', '*.jpg;*.jpeg;*.jpe;*.png;*.gif']]";
_uploader.ClientEvents.Add(new ClientEvent(ClientEventNames.AfterUpload, "afterUploadHandler"));
_uploader.ClientEvents.Add(new ClientEvent(ClientEventNames.AfterPackageUpload, "afterPackageUploadHandler"));
base.OnPreInit(e);
}
}
}