RadUpload corrupts the file

Thread is closed for posting
2 posts, 0 answers
  1. Megan
    Megan avatar
    2 posts
    Member since:
    Jul 2008

    Posted 08 Jul 2008 Link to this post

    I am using the RadUpload on multiple pages.  One of my pages corrupts the file.  It is saving the file, but the file is corrupted.  (In explorer, a jpg wont show the dimensions on these corrupted files).  The code is the same on all the pages.  Do you know what causes this?
    I am using Prometheus.

    Thanks,
    Megan
  2. Megan
    Megan avatar
    2 posts
    Member since:
    Jul 2008

    Posted 08 Jul 2008 Link to this post

    I just found the problem....only on this page, when I was doing some validation on the file before submitting, I had these two lines of code in

    byte[] content = new byte[uFile.ContentLength];

    uFile.InputStream.Read(content, 0, uFile.ContentLength);

    They weren't needed or doing anything, and then I called them again when I went to actually upload.  Most likely lost some part of the stream when doing this.

    Thanks

Back to Top