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

Notification

Icon
Error

Options
Go to last post Go to first unread
JesusInz  
#1 Posted : Wednesday, April 4, 2012 6:48:00 PM(UTC)
JesusInz

Rank: Newbie

Groups: Member
Joined: 4/4/2012(UTC)
Posts: 8

Hi. I'm testing the Java ImageUploader 7 on my ASP.Net 2.0 website. So far so good.

I have a form on which the user can update its profile, with an "Update" button that saves any information changed in the form, and then postbacks to the same page. Here the user is able to upload its picture with a regular upload input.

I have incorporated the IU7 component, and added the OnFileUploaded="FileUploaded" event handler:

Code:

protected void FileUploaded(object sender, FileUploadedEventArgs e)
    {
        Aurigma.ImageUploader.UploadedFile uploadedFile = e.UploadedFile;
        ConvertedFile thumbnailFile = uploadedFile.ConvertedFiles[0];

        string tempImagePath = Server.MapPath("~/ImageResizeCache/");

        if (thumbnailFile != null)
        {
            string thumbnailName = Utils.GetSafeFileName(tempImagePath, thumbnailFile.Name);
            thumbnailFile.SaveAs(Path.Combine(tempImagePath, thumbnailName));
        }
    }


The problem is I need to access the e.UploadedFile information UNTIL the user finishes updating any other information on the form. Basically calling the OnFileUploaded event when the user clicks the "Update" button, so it updates all the user's info, including the uploaded picture location.

I appreciate if anyone can shed some light on how to do this.
Dmitry.Obukhov  
#2 Posted : Sunday, April 8, 2012 7:21:17 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Jesus,

Thanks for contacting us.

You need to use AdditionalFormName property. It allows to send additional form with its fields along with files. Then you can get all the fields in the FileUploaded event. Please see Auxiliary data upload demo which demonstrates how to pass additional data along with uploaded files.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
JesusInz  
#3 Posted : Monday, April 9, 2012 8:21:11 AM(UTC)
JesusInz

Rank: Newbie

Groups: Member
Joined: 4/4/2012(UTC)
Posts: 8

Hi Dmitry,

Thanks for your reply. I figured it wasn't possible.

I will be purchasing the flash version of the Uploader instead. I'll post some questions in the appropriate forum.

Regards,
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.