Rank: Newbie
Groups: Member
Joined: 4/11/2008(UTC) Posts: 3
|
Hi there,
I've noticed that in the java version of the ImageUploader, the AfterUpload event does not fire consistently. It works sometimes, but other times it never gets calls.
I've experienced this on both Firefox and Safari browsers.
Is this is a known issue? Is there a fix/workaround?
Thanks! Stan
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 9/19/2006(UTC) Posts: 505
Was thanked: 41 time(s) in 41 post(s)
|
Hello Stan,
I could not reproduce an issue, I’ve tested IU 5.1.10 on Safari (Mac) and Firefox (Windows) and there were no result.
How frequently it does not fire and please, could you post your IU settings here? |
Best regards, Eugene Kosmin The Aurigma Development Team
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 3/4/2008(UTC) Posts: 9
|
I am having the same problem. It happens every time. I have tried firing the before and after upload events to capture the names entered and images selected, it works fine everywhere except for Mac FFox. It sometimes fires late, after the upload has redirected, almost as if it doesn't wait for the function that was called to finish. Please can you assist. Have updated all Java, FF, and Aurigma to 5.8 latest. Mac OSX is version 10.5 Code:
var iu = new ImageUploaderWriter("ImageUploader", 684, 395);
iu.addParam("LicenseKey", "72XXX-XXXXX-XXXXX-XXXXX-XXX90");
iu.activeXControlEnabled = false;
iu.javaAppletEnabled = true;
iu.javaAppletCached=true;
iu.javaAppletVersion = "5.8.1.0";
iu.activeXControlCodeBase = "ImageUploader5.cab";
iu.javaAppletCodeBase="./";
iu.addParam("PaneLayout", "TwoPanes");
iu.addParam("BackgroundColor", "#ffffff");
iu.addParam("ButtonSendText", "Upload Selection");
iu.addParam("RedirectUrl", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
iu.addParam("ShowDebugWindow", "true");
iu.addParam("showNonemptyResponse","");
iu.addParam("AllowCmykImages", "false");
iu.addParam("CmykImagesAreNotAllowedText", "CMYK colours. Cannot use unless converted to RGB colour profile.");
iu.addParam("FileMask", "*.jpg;*.gif;*.bmp;*.png;*.jpeg;*.jpe;*.tif");
iu.addParam("AllowLargePreview", "true");
iu.addParam("AllowAutoRotate", "true");
iu.addParam("ShowContextMenu", "false");
iu.addParam("EditDescriptionText", "Name?");
iu.addEventListener("BeforeUpload", "ImageUploader_BeforeUpload");
// I also have tried an AfterUpload event here, neither work in FF Mac
function ImageUploader_BeforeUpload(){
// here i loop through the selected items and get the names to pass on to the redirect url
// sometimes on Mac FF it gets in here, but too late, other times it never gets in here at all
// all other browsers and OS it works as expected
}
Edited by user Thursday, February 11, 2010 1:46:29 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
Hi Carolyn,
Could you please post your BeforeUpload code here. We will try to investigate the problem.
|
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 3/4/2008(UTC) Posts: 9
|
Code:
var counter = 0;
function ImageUploader_BeforeUpload(){
var sURL_Query = "";
var iuOBJ = getImageUploader("ImageUploader")
var description = "";
var imageindex = 1;
if(addList_M == ""){
for(i = 1; i <= iuOBJ.getUploadFileCount(); i++){
if(("" + iuOBJ.getUploadFileDescription(i)) == ""){
imageindex = imageindex + 1;
}else{
description = iuOBJ.getUploadFileDescription(i);
imageindex = 1;
if(description != ""){
counter = counter + 1;
}
addList_M = addList_M + description + ",";
}
//sURL_Query = sURL_Query + "&IO_" + i + "=" + description;
//sURL_Query = sURL_Query + "&II_" + i + "=" + imageindex;
iuOBJ.AddField("IO_" + i,description);
iuOBJ.AddField("II_" + i,imageindex);
}
if(counter == 0){
alert("Please enter at least one name.");
return false;
}
}
iuOBJ.setAction("XXXXXXX [ I reset the action here with the list of names in addList_M ] XXXXXXXX");
iuOBJ.setRedirectUrl(iuOBJ.getRedirectUrl() + addList_M);
}
The purpose of this function is to get the names entered into the uploader (ie. the description fields). Edited by user Monday, February 15, 2010 7:07:52 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
Hi Carolyn,
Thanks for the code. I tried to reproduce the problem many times but everything worked well. Could you please describe how to reproduce your problem step by step. Any additional information will be helpful.
|
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 3/4/2008(UTC) Posts: 9
|
Sure. I select the images I want to upload, testing with say 9, and I name 1 in 3 of the images... which is to tell my script that each set of 3 images belongs to the same "name" or a person/place.
That is why I need to pass the names list on to my next page, because I want to get the ID's of the newly added people.
This all works fine everywhere, but in Mac, it redirectes before it gets to run the Before or Afterupload events.
Sometimes it does run, but very late, and by that stage it has lost the controls and returns no descriptions/names.
What version of Mac OS and FF are you using? Also which version of Java?
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
I am using MacOS X 10.5.8, FF 3.6 and the latest update of Java plug-in. Probably the following algorithm helps you: - I recommend you to use PackageBeforeUpload event instead of BeforeUpload.
- With PackageBeforeUpload event you need to use FilesPerOnePackageCount property:
Code:iu.addParam("FilesPerOnePackageCount", "1");
iu.addEventListener("PackageBeforeUpload", "ImageUploaderID_PackageBeforeUpload");
- In this case each time in upload list you will have only one item and you can do all necessary changes.
This method works faster. |
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 4/10/2012(UTC) Posts: 1
Thanks: 1 times
|
I am having the same problem. The ActiveX control works fine in IE10 but if I try the java uploader in Google Chrome 26.0.1410.64 or Firefox 20.0.1 the FileUploaded handler is not invoked. I have an ASP.NET 4.0 website and my control looks like this... Code:
<aur:Uploader ID="ImageUploader1" runat="server"
LicenseKey="<%$ AppSettings:ImageUploaderLicenseKey %>" Width="100%" Height="500px"
EnableDescriptionEditor="true" EnableRotation="true">
<Converters>
<aur:Converter Mode="*.*=Thumbnail" ThumbnailWidth="1024" ThumbnailHeight="768" ThumbnailJpegQuality="75" />
</Converters>
<Restrictions FileMask="*.jpg;*.jpeg;*.png;*.gif;*.bmp" />
<UploadSettings RedirectUrl="PhotosEdit.aspx" FilesPerPackage="1" />
<FolderPane Height="370" />
<UploadPane ViewMode="List">
</UploadPane>
<PaneItem ShowFileNameInThumbnailsView="false">
</PaneItem>
<DetailsViewColumns InfoText="" />
</aur:Uploader>
the event handlers look like this in my code-behind: Code:
Protected Sub ImageUploader1_FileUploaded(ByVal sender As Object, ByVal e As FileUploadedEventArgs) Handles ImageUploader1.FileUploaded
Dim uploadedFile As UploadedFile = e.UploadedFile
Dim convertedFile As ConvertedFile = e.UploadedFile.ConvertedFiles(0)
'Save file
Dim imgStream As System.IO.Stream = convertedFile.FileStream
Dim intDocumentLength As Integer = imgStream.Length
Dim objP As New CComBOL.clsPhoto(LoggedOnUser)
objP.PhotoAlbumID = GetIntFromString(Request.QueryString("photoalbumid"))
objP.Description = uploadedFile.Description
objP.DescriptionLong = ""
objP.SiteLocationID = 0
objP.UserID = LoggedOnUser.UserID
objP.TakenBy = Request.QueryString("photographer")
objP.Tags = ""
Try
objP.DateTaken = CType(Request.QueryString("datetaken"), Date)
Catch ex As Exception
objP.DateTaken = Main.Mindate
End Try
objP.FileName = convertedFile.Name
objP.FileSize = convertedFile.Size
ReDim objP.Photo(intDocumentLength)
imgStream.Read(objP.Photo, 0, intDocumentLength)
imgStream.Close()
objP.AddNew()
End Sub
I am running the site debug mode and have a breakpoint on the beginning of the handler but it is never hit unless I am using IE. I am using Image Uploader 7.
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 12/19/2012(UTC) Posts: 164
Was thanked: 8 time(s) in 8 post(s)
|
Hi, The latest version of Upload Suite is 8.0.33. Moreover, due to the recent Java 7 Update 21 all older versions stopped working on machines with this version of Java. That's why, it is highly recommended to switch to 8.0.33. You can find more information about it here: http://forums.aurigma.co...Java-to-7-Update-21.aspxAs I can see you have version 7 of Upload Suite. You can update quickly, because version 8 have the same API as version 7 have. |
Best regards, Vitaly Kustov Aurigma Technical Support
|
1 user thanked vitaly for this useful post.
|
|
|
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.