This is a migrated thread and some comments may be shown as answers.

RadUpload Uploadedfiles collection EMPTY in IE(8) but not in Firefox

2 Answers 67 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Grey
Top achievements
Rank 1
Grey asked on 25 Jan 2011, 12:16 PM
Hi,

Hi have a raduploadcontrol as below :

<telerik:RadUpload ID="RadUpload1" runat="server" AllowedFileExtensions=".jpeg,.gif,.png,.jpg"
    ControlObjectsVisibility="None" OverwriteExistingFiles="True" AllowedMimeTypes="image/png,image/jpeg,image/gif">
</telerik:RadUpload>

File upload works perfectly fine in Firefox.

However when I try the same thing in IE it seems that there is no instance of the uploaded file available in the collection

Take a look at the firefox/ie images I've uploaded and you'll see what I mean.

For Each f As UploadedFile In RadUpload1.UploadedFiles
strNewMasterFilename = Server.MapPath("~/blogs/" & strActiveBlogName & "/" & strActiveBlogName & "_masterimage") & f.GetExtension

 f.SaveAs(strNewMasterFilename, True)
Next

So Basically the radupload1.uploadedfiles collection is returning null in IE, and the correct value in Firefox (also works fine in Opera)

Does anyone have any ideas ?

Its driving me crazy.


2 Answers, 1 is accepted

Sort by
0
Accepted
Cori
Top achievements
Rank 2
answered on 25 Jan 2011, 07:04 PM
Hello Grey,

Does the file show up in the InvalidFiles collection when you upload using IE? Perhaps it could be a mime type issue?
0
Grey
Top achievements
Rank 1
answered on 26 Jan 2011, 11:50 PM
Yes.

That makes sense. I extended the allowed mime types, adding image/pjpeg,image/x-png after reading the helpdocs,
specifically this quote :

"Different browsers serve different MIME types for the same files. For example, .JPG files are uploaded with image/pjpeg mime-type when using IE and image/jpeg, when using Firefox."

Now it works fine in both browsers.

Thanks so much for pointing me in the right direction
Tags
Upload (Obsolete)
Asked by
Grey
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Grey
Top achievements
Rank 1
Share this question
or