This is a migrated thread and some comments may be shown as answers.
RadUpload corrupts the file
1 Answer 42 Views
This is a migrated thread and some comments may be shown as answers.
Megan
Top achievements
Rank 1
Megan asked on 08 Jul 2008, 07:27 PM
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

1 Answer, 1 is accepted

Sort by
0
Megan
Top achievements
Rank 1
answered on 08 Jul 2008, 08:05 PM
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

Asked by
Megan
Top achievements
Rank 1
Answers by
Megan
Top achievements
Rank 1
Share this question
or