.Net dialog upload not using Type attribute during save
|Reported by:||mufasa@…||Owned by:|
|Component:||Server : ASP.Net||Version:|
I didn't have time to make a patch, but the ASP.NET upload mechanism does not utilize the (now default) file type attribute (Type=(Image|File|Flash|etc)) from the GET request during file upload.
Files uploaded via the dialog windows' (Image, Flash, etc.) Upload tab all get dumped into the root UserFiles directory. But all other code, including the Browse button on the same dialog window, only show the files in the individual sub directories.
In the meantime, I have disabled the Upload tabs from those dialogs to force my users to use the file Browser upload feature instead, which does use the type attribute properly.
The Type is passed via the HTTP request though already. All you have to do is just insert Request.QueryStringType? in between the path (this.UserFilesDirectory) and file name (sFileName) to the full path (sFilePath). This can probably be done around line 51 in Uploader.cs when the strings are Path.Combine()'d. (Some basic error checking should be added or course for missing or known-only parameters.)
I would do this myself and submit a patch but I don't have the full Visual Studio package and don't want to bother doing all the compiling manually.
(Version 2.3.1 and FCKeditor.NEt_2.2 on a Microsoft ASP.NET 2.0 platform. All browsers affected as it is a server-side issue.)