Upload random file

May 16, 2009 at 4:05 AM

Hi,

    first I want to say that your control is awesome.. Probably the best fileupload avalaible from the code source community on the net. But... I have an problem and I don't know why. When I try to upload multiple files, the control upload randomly a number of files and for a max of 2. I tried to find a solution for that and I found out that some images can confuse the control... But it is very weird. The event FileReceived is called as many time as the randomly number is.

The control use my custom adapter which save the file in a custom folder...

Do you have any idea?

Thank You

Coordinator
May 16, 2009 at 7:27 AM

FileReceived is called once per each file. Check your adapter.

May 16, 2009 at 2:50 PM

Hi,

      here is the code that I use. If you think that everything is fine I can send you my 2 images which cause the problem.

Thank You.

 

  <fjx:FileUploader id="FileUploader1" MaxNumberFiles="5"  OnFileReceived="FileReceived"  runat="server"   UseInsideUpdatePanel="true">
            <Adapters>
                <adaptupload:AdapterUpload runat="server" OnDownloadTerminated="DownloadTerminated" PathDirectory="/Admin/Files/Images">    </adaptupload:AdapterUpload>
            </Adapters>
        </fjx:FileUploader>

 

 public class AdapterUpload : FileUploaderAdapter
    {

     (Property code  + Event code)
      

        /// <param name="file">Incoming file</param>
        public override void ProcessFile(HttpPostedFile file)
        {
            string filename = HttpContext.Current.Server.MapPath(string.Concat("~", PathDirectory, "/", file.FileName));
            file.SaveAs(filename);
        }

    }

Coordinator
May 16, 2009 at 4:16 PM

You can submit those images in the issue tracker