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

Notification

Icon
Error

Options
Go to last post Go to first unread
anon  
#1 Posted : Monday, March 06, 2006 8:34:48 AM(UTC)
anon

Rank: Member

Groups: Member
Joined: 3/6/2006(UTC)
Posts: 2

Hello,

Thank you for your time. I am having an error with the following line of code:

Code:
iu.addParam("UploadSourceFile", "True");


On Safari 2.0.3, when it is set to false I get a 500 server error. I am using the ASP Dundas Upload object to handle the file uploading.

When it is set to true it works no problem.

Also, the iu.addParam("UploadThumbnail1FitMode", "Fit"); does not seem to be working for me in this environment as well.


Code:
    iu.addParam("UploadSourceFile", "True");
    iu.addParam("UploadThumbnail1FitMode", "Fit");
    iu.addParam("UploadThumbnail1Width", "400");
    iu.addParam("UploadThumbnail1Height", "400");
    iu.addParam("UploadThumbnail1JpegQuality", "75");


The image is uploaded but not resized accordingly. Am I missing something? Please advise.

The full code is below. The below code will upload across all platforms, but will not resize on Mac 10.4.5/Safari 2.0.3 + Latest Firefox. When UploadSourceFile is set to False, the upload ceases to work on Mac environment mentioned above, but will continue to work on PC environment.

Thanks,
-tim


Code:
    var iu = new ImageUploaderWriter("ImageUploader", 800, 350);
    iu.activeXControlEnabled = true;
    iu.javaAppletEnabled = true;

    //For ActiveX control we specify full path for CAB file
    iu.activeXControlCodeBase = "../ImageUploader3.cab";
    iu.activeXControlVersion = "3,5,120,0";

    //For Java applet we specify only directory with JAR files
    iu.javaAppletCodeBase = "./";
    iu.javaAppletCached = true;
    iu.javaAppletVersion = "1.1.02.0";

    iu.addParam("Layout","OnePane");
    iu.addParam("EnableRotate","True");
    
    
    iu.addParam("UploadSourceFile", "True");
    iu.addParam("UploadThumbnail1FitMode", "Fit");
    iu.addParam("UploadThumbnail1Width", "400");
    iu.addParam("UploadThumbnail1Height", "400");
    iu.addParam("UploadThumbnail1JpegQuality", "75");
    iu.addParam("UploadThumbnail2FitMode","Off");
    iu.addParam("UploadThumbnail3FitMode","Off");
    
    
    iu.addParam("Action","upload_process2.asp?EVENTID=<%=Request.QueryString("EVENTID")%>");
    iu.addParam("LicenseKey","0538-1300-4340-1968;8325-9815-7669-6298");
    iu.addParam("RedirectURL","upload_complete.asp?EVENTID=<%=Request.QueryString("EVENTID")%>");
    iu.addParam("MessageUploadCompleteText","");
    iu.addParam("BackgroundColor","#FFFFFF");
    iu.addParam("AdditionalFormName", "frmPhotoInfo");
    iu.addParam("ShowDebugWindow", "True");
    iu.addParam("ShowButtons","False");
    iu.addParam("ShowDescriptions","False");
    iu.addParam("SignatureFilter", "Images");
    iu.addParam("FileMask", "*.jpg");
    iu.addParam("LoadingFilesText", "Finding your photos... Be patient if you have a large number of photos.");
    iu.addParam("FilesPerOnePackageCount", "1");

    iu.writeHtml();

Edited by user Monday, February 18, 2008 4:23:02 PM(UTC)  | Reason: Not specified

Alex Makhov  
#2 Posted : Monday, March 06, 2006 2:44:53 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

Which upload processing script do you use? If you are using our samples then setting UploadSourceFile value to false will make our upload processing code to fail because it needs source file.
Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
anon  
#3 Posted : Tuesday, March 07, 2006 2:34:30 AM(UTC)
anon

Rank: Member

Groups: Member
Joined: 3/6/2006(UTC)
Posts: 2

Thank you for your response. I am using Dundas uploading component. The last line is throwing the error on MAC with UploadSource set to false. Works fine on PC however.


Code:
Set objUpload = Server.CreateObject("Dundas.Upload.2")
objUpload.UseVirtualDir = False
objUpload.MaxUploadSize = 1000000000
'We need to fetch first source images to populate Form collection
Set objNextFile = objUpload.GetNextFile
  
'Total amount of uploaded files
intFileCount = objUpload.Form("FileCount").Value
intTotalFileCount = CDbl(objUpload.Form("FileCount").Value) * CDbl(objUpload.Form("PackageCount").Value)
intPackageIndex = CDbl(objUpload.Form("PackageIndex").Value)
strEventId = objUpload.Form("hidEventId").Value
intMediaItemId = objUpload.Form("hidMediaItemId").Value
strPath = objUpload.Form("hidPath").Value
  
'We run over uploaded images and load it
'strPath = "\\servername\foldername"

Dim strFileName, strNewFileName
	
strFileName = Replace(objUpload.GetFileName(objNextFile.OriginalPath),"_Thumbnail1.jpg","")
strNewFileName = strFileName

'Check whether file with such name already exists and if so,
'construct safe filename name (to avoid collision)
Dim j 
j = 1
While objUpload.FileExists(strPath & strNewFileName)
	strNewFileName = j & "_" & strFileName
	j = j + 1
Wend

strFileName = strNewFileName

objNextFile.Save strPath

Edited by user Thursday, December 20, 2007 5:02:24 PM(UTC)  | Reason: Not specified

Alex Makhov  
#4 Posted : Thursday, March 09, 2006 5:57:09 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

What is the error page content?
Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
bradmurray  
#5 Posted : Tuesday, June 06, 2006 5:37:52 AM(UTC)
bradmurray

Rank: Member

Groups: Member
Joined: 3/23/2006(UTC)
Posts: 17

I am seeing a similar error on both Safari and Firefox on the Mac. I give the user the option to upload the original, a 4x6-optimized or 3x5-optimized image. In no case do I specifically upload the original as far as the component is concerned. If original is selected I use a thumbnail width and height of 4800. For 4x6 I use 1800 and for 3x5 I use 1500. 4x6 and 3x5 work fine, but with the 4800 setting I get the error message just after the "preparing data" status message.
Fedor  
#6 Posted : Tuesday, June 06, 2006 10:00:07 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,545

Thanks: 5 times
Was thanked: 58 time(s) in 57 post(s)
Please post here the Java console content.
Best regards,
Fedor Skvortsov
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.