Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
sergeim  
#1 Posted : Wednesday, October 6, 2010 9:21:28 AM(UTC)
sergeim

Rank: Member

Groups: Member
Joined: 2/8/2007(UTC)
Posts: 10

Hello. I've noticed there's a problem with the new Flash uploader. It keeps uploading 3 files for each image all the time, no matter how many converters are defined. I've tried to defined single converter mode (either sourcefile or a thumb) and still every time I upload, I get 3 files for each image in the $_POST array. So i'm assuming it keeps sending 3 times more data, than it is supposed to for every upload all the time, if I only need one converter.
inkFrog Inc.
Dmitry.Obukhov  
#2 Posted : Wednesday, October 6, 2010 7:54:31 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Sergei,

I have checked it. I’ve created simple application based on demo of Flash Uploader, and run it on my machine locally. This application allows uploading one thumbnail only, and I’ve got one thumbnail for one uploaded image, not more.
Could you provide me with a link to your site where you use Flash Uploader, please? If it is not possible, please send me complete application sample including used client and server script. I need to test and check it. In the case if you do not want to attach your sample in public forum, you will be able to submit a new support ticket.

We have not got the same complaints before from our users. I assume if the problem takes place, our clients have contacted us on this issue by the present moment.

Looking forward to your reply.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
sergeim  
#3 Posted : Wednesday, October 6, 2010 10:54:12 PM(UTC)
sergeim

Rank: Member

Groups: Member
Joined: 2/8/2007(UTC)
Posts: 10

Hello. If I'll post the URL, you won't be able to check $_POST variables on the server side. So maybe the best is to post the code I'm using? Here I'm initializing the uploader:


Code:
<script type="text/javascript">
	//<![CDATA[
	$au.imageUploaderFlash({
		id: 'Uploader1',
		licenseKey: 'xxxxx-xxxxx-xxxxx-xxxxx-xxxxx', // our evaluation license key
		width: '620px',
		height: '480px',
		listView: {
			addFilesButton: "+ Add images for upload",
			iconItemWidth: 190,
			iconSize: 18,
			tileItemWidth: 290,
			thumbnailPreviewSize: 100,
			//view: "Tiles",
    	},
		converters: [
			{ mode: '*.*=SourceFile' }
		],
		upload: {
			actionUrl: '/img_scripts/upload3.php?flash=1',
		},
		flashControl: {
			codeBase: '/scripts/imageuploaderflash.swf',
			bgColor: '#f5f5f5'
		},
		restrictions: {
			maxFileSize: 31457280, // 30 MB
			fileFilters: [['Images (*.jpg; *.jpeg; *.png; *.gif)', '*.jpg;*.jpeg;*.png;*.gif']]
		},
		statusPanel: {
	        sendButton: "Upload",
        },
        topPanel: {
	        titleLabel: "Images for upload",
			addFilesLink: "Add more images",
			removeAllFilesLink: "remove all images",
	    },
	    metadata: {
        	additionalFormName: "iuFlashForm",
    	},
	});

	$au.imageUploaderFlash('Uploader1').writeHtml();
	//]]>
</script>

<form name="iuFlashForm" id="iuFlashForm" method="POST">

some hidden form values..

</form>




Edited by user Wednesday, October 13, 2010 5:28:59 PM(UTC)  | Reason: Not specified

inkFrog Inc.
sergeim  
#4 Posted : Wednesday, October 6, 2010 10:57:14 PM(UTC)
sergeim

Rank: Member

Groups: Member
Joined: 2/8/2007(UTC)
Posts: 10

And here's the result that I get:


$_POST Array
(
[PackageGuid] => {2ECD7D62-B76C-2FB6-A856-86E6AC68EEEB}
[PackageFileCount] => 1
[PackageIndex] => 0
[SourceName_0] => 1983_Jaguar_XJ6.jpg
[SourceSize_0] => 24063
[SourceWidth_0] => 270
[SourceHeight_0] => 180
[SourceCreatedDateTime_0] => 2010:09:09 01:19:04
[SourceCreatedDateTimeLocal_0] => 2010:09:09 04:19:04
[SourceLastModifiedDateTime_0] => 2010:09:09 01:19:04
[SourceLastModifiedDateTimeLocal_0] => 2010:09:09 04:19:04
[Angle_0] => 0
[Description_0] =>
[folder] => 6
[wColor] => C0C0C0
[wText] => Watermark Text
[File0Width_0] => 270
[File0Height_0] => 180
[File0Mode_0] => sourceFile
[File0Name_0] => 1983_Jaguar_XJ6.jpg_Source0.jpg
[File0_0] => .....
[File0Size_0] => 24063
[File1Width_0] => 270
[File1Height_0] => 180
[File1Mode_0] => sourceFile
[File1Name_0] => 1983_Jaguar_XJ6.jpg_Source1.jpg
[File1_0] => .....
[File1Size_0] => 24063
[File2Width_0] => 270
[File2Height_0] => 180
[File2Mode_0] => sourceFile
[File2Name_0] => 1983_Jaguar_XJ6.jpg_Source2.jpg
[File2_0] => .....
[File2Size_0] => 24063
[PackageCount] => 1
)

Edited by user Thursday, October 7, 2010 12:32:25 AM(UTC)  | Reason: Not specified

inkFrog Inc.
Dmitry.Obukhov  
#5 Posted : Thursday, October 7, 2010 6:55:17 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Sergei,

I have looked through your code. It is okay.
Please provide me with a link to your page with Image Uploader Flash. It would be great if you send me file with your server script, which allows saving files to the server. It is necessary for testing.
Also, I need additional information on client and server machines you use. Please let me know used OS where this issue occurs.

Looking forward to your reply.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
sergeim  
#6 Posted : Monday, October 11, 2010 4:39:06 AM(UTC)
sergeim

Rank: Member

Groups: Member
Joined: 2/8/2007(UTC)
Posts: 10

Hello. I've just figured out the issue. When prototype.js and scriptaculous.js libraries have been removed from the page, it started to work normally. So these libraries have been causing the problem. The problem is solved for us, but if you need a test page to confirm the problem, lmk.

inkFrog Inc.
Dmitry.Obukhov  
#7 Posted : Monday, October 11, 2010 7:20:11 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Sergei,

I have looked our bug system and found that one of our clients experienced the same problem with using prototype.js. Our developer has fixed it. I attached fixed aurigma.imageuploaderflash.js file. Please replace your old aurigma.imageuploaderflash.js file with the new one. It should work with prototype.js library okay. The future releases will be free of this issue. Sorry for inconvenience.

Please feel free to let me know if you have any additional questions or problems.
File Attachment(s):
aurigma.imageuploaderflash.corrected.zip (16kb) downloaded 20 time(s).
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
sergeim  
#8 Posted : Wednesday, October 13, 2010 12:59:57 PM(UTC)
sergeim

Rank: Member

Groups: Member
Joined: 2/8/2007(UTC)
Posts: 10

hello.. yep, partly it fixed the problem (only 1 thumbnail is uploading now), but switching to the SourceFile mode on-the-fly (using your sample beforeUpload function from the uploader documentation) doesn't work in this case still, so there may be other problems with the prototype.js as well. The only fix was to put the uploader into an iframe with its own environment and only then it started to work flawlessly. Unfortunately we still have to keep the prototype.js on our website..
inkFrog Inc.
Dmitry.Obukhov  
#9 Posted : Wednesday, October 13, 2010 5:27:56 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Sergei,

Could you provide me with complete sample application please? Our developer need to test it and try to find a reason of the problem. If you do not want to attach your files on public forum, you will be able to submit new support ticket.

Looking forward to your reply.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
EricHop  
#10 Posted : Thursday, October 14, 2010 7:14:59 AM(UTC)
EricHop

Rank: Newbie

Groups: Member
Joined: 10/1/2010(UTC)
Posts: 5

When using this new .js the triple size upload problem is gone, but the javascript events for afterUpload and afterPackageUpload will no longer fire.
EricHop  
#11 Posted : Thursday, October 14, 2010 9:42:57 AM(UTC)
EricHop

Rank: Newbie

Groups: Member
Joined: 10/1/2010(UTC)
Posts: 5

Additional info: in the old .js the $au.converters object contains 3 "*.*=SourceFile" converters.
That would explain the 3-fold size.
sergeim  
#12 Posted : Thursday, October 14, 2010 11:53:44 AM(UTC)
sergeim

Rank: Member

Groups: Member
Joined: 2/8/2007(UTC)
Posts: 10

I've found even more problems :) I'm contacting you through the link with a standalone test version of the uploader..
inkFrog Inc.
sergeim  
#13 Posted : Thursday, October 14, 2010 11:55:16 AM(UTC)
sergeim

Rank: Member

Groups: Member
Joined: 2/8/2007(UTC)
Posts: 10

EricHop wrote:
Additional info: in the old .js the $au.converters object contains 3 "*.*=SourceFile" converters.
That would explain the 3-fold size.

I've noticed the only thing changed is the "for" loop, where converters are being initialized..
inkFrog Inc.
Dmitry.Obukhov  
#14 Posted : Thursday, October 14, 2010 8:54:21 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
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?
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
EricHop  
#15 Posted : Friday, October 15, 2010 12:44:49 AM(UTC)
EricHop

Rank: Newbie

Groups: Member
Joined: 10/1/2010(UTC)
Posts: 5

sergeim wrote:
EricHop wrote:
Additional info: in the old .js the $au.converters object contains 3 "*.*=SourceFile" converters.
That would explain the 3-fold size.

I've noticed the only thing changed is the "for" loop, where converters are being initialized..


Yeah, that for loop is no longer equivalent. In the original one var i is an object, used to index the array in arguments[0]:
for (var i in arguments[0]) {
convertersObj.add(arguments[0][i]);
In the new one, var j is an integer, which is used to index the array in arguments[0];
for (var j = 0, jmax = arguments[0].length; j < jmax; j++) {
convertersObj.add(arguments[0][j]);
The original is was equivalent with:
for (var j = 0, jmax = arguments[0].length; j < jmax; j++) {
convertersObj.add(arguments[0][arguments[0][j]]);

I tried debugging the code, but I cannot set breakpoints in firebug, so I had to rely on console.log()...
EricHop  
#16 Posted : Friday, October 15, 2010 12:53:36 AM(UTC)
EricHop

Rank: Newbie

Groups: Member
Joined: 10/1/2010(UTC)
Posts: 5

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);
}
}
}
EricHop  
#17 Posted : Friday, October 15, 2010 4:52:29 AM(UTC)
EricHop

Rank: Newbie

Groups: Member
Joined: 10/1/2010(UTC)
Posts: 5

my problem went away when I added a second converter ("*.*=Icon"). Now with the latest .js it only uploads the image and the icon (which has very small size). It is at least an improvement, and the event handlers will fire properly:

_uploader.Converters.Add(new Converter { Mode = "*.*=SourceFile" });
_uploader.Converters.Add(new Converter { Mode = "*.*=Icon" });
sergeim  
#18 Posted : Monday, October 25, 2010 3:53:50 PM(UTC)
sergeim

Rank: Member

Groups: Member
Joined: 2/8/2007(UTC)
Posts: 10

I can confirm Erics words too, had to add an additional converter instance (Mode = "*.*=Icon") in order to make the uploader work, when uploading original images, or else it gets stuck after the 1st image.

Also another note.. in the Internet Explorer browser dynamic div layers won't show on top of the uploader, the flash movie will overlap them, unless you modify imageuploaderflash.js file and add the following code after "imageuploaderflash.swf", isAttribute: true },:

{ name: "wmode", defaultValue: "transparent", isAttribute: true },
then

wmode: function(wmode){},
after codeBase: function(codeBase) {...}

and finally

wmode: uploader.flashControl().wmode() || "transparent",

after

bgcolor: uploader.flashControl().bgColor() || "#869ca7",

Too many quirks, ehh..?
inkFrog Inc.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.