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

Notification

Icon
Error

Options
Go to last post Go to first unread
bianchi007  
#1 Posted : Thursday, April 18, 2013 11:08:54 PM(UTC)
bianchi007

Rank: Newbie

Groups: Member
Joined: 4/18/2009(UTC)
Posts: 6

Was thanked: 1 time(s) in 1 post(s)
I'm trying to set up my code with the Uploader 8 javascript API and C#.

How do you get the uploaded image width and height using Uploader 8? For example in Image Uploader 6 I could use the Request.Form.

Here is what I used with Image Uploader 6:

HttpPostedFile imgFull = Request.Files["Thumbnail1_" + i];

// Request.Form["Thumbnail1FileSize_" + i].ToString();

// Request.Form["Thumbnail1Width_" + i].ToString();

// Request.Form["Thumbnail1Height_" + i].ToString();

HttpPostedFile imgFull = Request.Files["Thumbnail2_" + i];

// Request.Form["Thumbnail2FileSize_" + i].ToString();

// Request.Form["Thumbnail2Width_" + i].ToString();

// Request.Form["Thumbnail2Height_" + i].ToString();

Also, how do you upload multiple sizes for a single image. In Image Uploader 6 I used the following:

iu.addParam("UploadThumbnail1FitMode", "Fit");

iu.addParam("UploadThumbnail1Width", "700");

iu.addParam("UploadThumbnail1Height", "525");

iu.addParam("UploadThumbnail1JpegQuality", "72");

iu.addParam("UploadThumbnail1ResizeQuality", "High");

iu.addParam("UploadThumbnail2FitMode", "Fit");

iu.addParam("UploadThumbnail2Width", "400");

iu.addParam("UploadThumbnail2Height", "300");

iu.addParam("UploadThumbnail2JpegQuality", "72");

Is the below code the correct way for doing multiple sizes per image upload with Uploader 8?:

converters: [

{ mode: '*.*=Thumbnail1', thumbnailWidth: 800, thumbnailHeight: 600,

thumbnailJpegQuality: 72, thumbnailFitMode: 'Fit'},

{ mode: '*.*=Thumbnail2', thumbnailWidth: 400, thumbnailHeight: 300,

thumbnailJpegQuality: 72, thumbnailFitMode: 'Fit'},

{ mode: '*.*=Thumbnail3', thumbnailWidth: 100, thumbnailHeight: 75,

thumbnailJpegQuality: 72, thumbnailFitMode: 'Fit'

}],

vitaly  
#2 Posted : Sunday, April 21, 2013 9:43:09 PM(UTC)
vitaly

Rank: Advanced Member

Groups: Member
Joined: 12/19/2012(UTC)
Posts: 164

Was thanked: 8 time(s) in 8 post(s)
Hello bianchi007,

You can find out about getting image width and height in the documentation topic: http://www.aurigma.com/d...t-field-reference-iu.htm

Quote:

Is the below code the correct way for doing multiple sizes per image upload with Uploader 8?:

converters: [

{ mode: '*.*=Thumbnail1', thumbnailWidth: 800, thumbnailHeight: 600,

thumbnailJpegQuality: 72, thumbnailFitMode: 'Fit'},

{ mode: '*.*=Thumbnail2', thumbnailWidth: 400, thumbnailHeight: 300,

thumbnailJpegQuality: 72, thumbnailFitMode: 'Fit'},

{ mode: '*.*=Thumbnail3', thumbnailWidth: 100, thumbnailHeight: 75,

thumbnailJpegQuality: 72, thumbnailFitMode: 'Fit'

}],

So upload multiple sizes per image with Upload Suite 8 you can use many converters like this:

Code:

converters: [
            { mode: '*.*=SourceFile' },
            { mode: '*.*=Thumbnail', thumbnailFitMode: 'Fit', thumbnailWidth: '120', thumbnailHeight: '120' },
            { mode: '*.*=Thumbnail', thumbnailFitMode: 'Fit', thumbnailWidth: '240', thumbnailHeight: '240' }
            // .....
        ], 

I hope it helps.

Best regards,

Vitaly Kustov

Aurigma Technical Support

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.