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

Notification

Icon
Error

Options
Go to last post Go to first unread
dotcomtim  
#1 Posted : Tuesday, September 4, 2007 9:53:36 AM(UTC)
dotcomtim

Rank: Member

Groups: Member
Joined: 11/29/2006(UTC)
Posts: 14

I like to confirm the resizing of photos are client side and not server side, as I am uploading live to the server and it should be taking this long.

Code:
iu.activeXControlVersion = "4,5,35,0";
iu.addParam("FileMask", "*.jpg;");
iu.addParam("MaxFileCount", "50");
iu.addParam("MaxFileSize", "1572864");
iu.addParam("MinImageHeight", "800");
iu.addParam("MinImageWidth", "1200");
iu.addParam("UploadSourceFile", "true");
iu.addParam("UploadThumbnail1FallbackMode", "SourceFile");
iu.addParam("UploadThumbnail1CopyExif", "false");
iu.addParam("UploadThumbnail1FitMode", "Width");
iu.addParam("UploadThumbnail1Width", "400");
iu.addParam("UploadThumbnail1Height", "270");
iu.addParam("UploadThumbnail1JpegQuality", "70");
iu.addParam("UploadThumbnail1ResizeQuality", "Medium");
iu.addParam("UploadThumbnail2FallbackMode", "SourceFile");
iu.addParam("UploadThumbnail2CopyExif", "false");
iu.addParam("UploadThumbnail2FitMode", "Width");
iu.addParam("UploadThumbnail2Width", "225");
iu.addParam("UploadThumbnail2Height", "150");
iu.addParam("UploadThumbnail2JpegQuality", "70");
iu.addParam("UploadThumbnail2ResizeQuality", "Medium");
iu.addParam("UploadThumbnail3CopyExif", "false");
iu.addParam("UploadThumbnail3FitMode", "Width");
iu.addParam("UploadThumbnail3Width", "640");
iu.addParam("UploadThumbnail3Height", "427");
iu.addParam("UploadThumbnail3JpegQuality", "90");
iu.addParam("UploadThumbnail3ResizeQuality", "Medium");
iu.addParam("UploadThumbnail3CompressOversizedOnly", "true");


Here is an example file with dimensions and size that I am uploading.
2285x1523 929kb, when uploading it says now uploading 1,258kb which is strange because the file isn’t even that size. The 3 resized files after being uploaded don’t even equal that. (108kb+25kb+6kb)

When I resized everything manually and upload the 28 photos it took me 8 minutes, using the uploader it took up to 45 minutes.

Is the above correct to upload thumbnails only without the original source?

Edited by user Tuesday, February 12, 2008 2:22:08 PM(UTC)  | Reason: Not specified

Alex Makhov  
#2 Posted : Tuesday, September 4, 2007 2:08:36 PM(UTC)
Alex Makhov

Rank: Advanced Member

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

Hello,

The following line of code:
Code:
iu.addParam("UploadSourceFile", "true");
makes Image Uplader to upload source file. Replace true with false and original files will not be uploaded.

Edited by user Sunday, February 24, 2008 5:01:30 PM(UTC)  | Reason: Not specified

Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
dotcomtim  
#3 Posted : Tuesday, September 4, 2007 8:02:47 PM(UTC)
dotcomtim

Rank: Member

Groups: Member
Joined: 11/29/2006(UTC)
Posts: 14

I tried that and nothing gets uploaded, all 3 resized files are empty.
dotcomtim  
#4 Posted : Wednesday, September 5, 2007 5:07:45 AM(UTC)
dotcomtim

Rank: Member

Groups: Member
Joined: 11/29/2006(UTC)
Posts: 14

After some tweeking around I got it to finally upload something, with the original source file turned off it had no idea what to name the photos while uploading them.

My last question, when I did tweek this the files where being named photo1.jpg_Thumbnail1.jpg' and I like to keep the original name, which would be photo1.jpg.

To accomblish this I had to do the following:

Code:
$fileCount = $_POST["FileCount"];
for ($i = 1; $i <= $fileCount; $i++)
{
	$thumbnail1Field = "Thumbnail1_" . $i;
	$fileName = str_replace('_Thumbnail1.jpg', '', $_FILES[$thumbnail1Field]['name']);
	move_uploaded_file($_FILES[$thumbnail1Field]['tmp_name'], $absGalleryPath . '/'.$fileName);
}


Is there a simpler way of getting the original file name that I am missing.

Edited by user Monday, December 17, 2007 1:00:38 PM(UTC)  | Reason: Not specified

Alex Makhov  
#5 Posted : Wednesday, September 5, 2007 5:44:59 PM(UTC)
Alex Makhov

Rank: Advanced Member

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

Hello,

Yes please read POST Field Reference topic, especially the FileName_N field description. I think it is what you need.

Edited by user Tuesday, October 28, 2008 8:24:19 PM(UTC)  | Reason: Not specified

Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
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.