Rank: Newbie
Groups: Member
Joined: 6/29/2008(UTC) Posts: 7
|
Hi,
I am using Custom buttons in Two Panes layeout. I need to check if any particular thumbnail is rotated, before uploading. Is their any Rotation Event ?
Thanks, Jyotindra
|
|
|
|
Rank: Advanced Member
Groups: Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
Hello Jyotindra, In this case I recommend you to use BeforeUpload event listener, which rises before upload process starts. Here you can look through all files from upload list and detect rotated items using getUploadFileAngle() method. To get more information click here: |
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 6/29/2008(UTC) Posts: 7
|
Hi,
I am using imageUploader.getUploadFileAngle(Index) in BeforUpload() Event
How to Get "Index" value of File in BeforeUpload() Event ?
Let say i have 3 image to Upload. From this 3 image user only rotates one particulare image . For that particular rotated image in need to construct a specifice URL parament.
Some code is like this
<script type="text/javascript" src="../MultiImageUpload/iuembed.js"></script> <script type="text/javascript">
function ImageUploader_BeforeUpload() { var imageUploader = getImageUploader('ImageUploader'); if (imageUploader) { var Fileangle = imageUploader.getUploadFileAngle(1); var vTempActionUrl = imageUploader.getAction() + "&IsRotated=" +(imageUploader.getUploadFileAngle(1) > 0) + "&Rotateangle=" +imageUploader.getUploadFileAngle(1); imageUploader.setAction(vTempActionUrl);
}
}
I need "Index" value in Before_Upload Event to use imageUploader.getUploadFileAngle(Index) , So that I can get correct value of Angle of rotated image
Do I have loop on to get correct Index value for getUploadFileAngle(i) ?
for (i=imageUploader.getUploadFileCount(); i>=1; i--){ }
Please reply ASAP
Thanks, Jyotindra
|
|
|
|
Rank: Advanced Member
Groups: Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
Hi, According to your problem I recommend you to use the following method. You should send one file in one package only. Before package sending you can check rotate angle. This code demonstrates how to do it: Code: var iu = new ImageUploaderWriter("ImageUploader", 610, 490);
// other params
iu.addParam("FilesPerOnePackageCount", "1");
iu.addEventListener("PackageBeforeUpload", "ImageUploader_PackageBeforeUpload");
// other params
iu.writeHtml();
function ImageUploader_PackageBeforeUpload(PackageIndex)
{
var imageUploader = getImageUploader('ImageUploader');
if (imageUploader)
{
var Fileangle = imageUploader.getUploadFileAngle(1);
var vTempActionUrl = imageUploader.getAction() +
"&IsRotated=" +(imageUploader.getUploadFileAngle(1) > 0) +
"&Rotateangle=" +imageUploader.getUploadFileAngle(1);
imageUploader.setAction(vTempActionUrl);
}
}
Please let us knoe if you have any questions. Edited by user Monday, September 14, 2009 3:42:03 PM(UTC)
| Reason: Not specified |
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 6/29/2008(UTC) Posts: 7
|
Hello Tamila,
Thanks, PackageBeforeUpload() Event help me.
I have one more problem.
How can calculate FileSize + Rotated ThumbNail Size on BeforeUpload() Event or UploadFileCountChange() Events
For Example I have Select 3 Files ("A","B", "C"), File "B" Rotated So I Need to Calculate the Size as per ThumbnailNN Size, reset of the files "A" and "C" which is not rotated i need to calculate the size as per Original Size, So My Equation will be some Like this
Total File Size = "A" (Original File Size) + "B" (ThumbnailNN Size) + "C" (Original File Size)
I my case ThumbnailNN FitMode = "ActualSize" (Need to convert rotation image same Original File)
How can Calculate the Total File size before uploading get started in smatest way ?
Thanks, Jyotindra
|
|
|
|
Rank: Advanced Member
Groups: Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
Hi,
Unfortunately, you cannot get thumbnail size before upload process starts.
|
|
|
|
|
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.