This question is locked. New answers and comments are not allowed.
Hello,
Is there a possibility to extend the list of file types which can be uploaded with the ImageBrowser ? At the moment it seems that only png, gif, jpg and jpeg can be uploaded.
thanks
Is there a possibility to extend the list of file types which can be uploaded with the ImageBrowser ? At the moment it seems that only png, gif, jpg and jpeg can be uploaded.
thanks
7 Answers, 1 is accepted
0
Stefan
Top achievements
Rank 1
answered on 09 Jan 2012, 08:34 AM
Hello again,
Is there any solution to this ? As a requirement from the client I have to support more file types, so I would really appreciate any help.
thanks
Is there any solution to this ? As a requirement from the client I have to support more file types, so I would really appreciate any help.
thanks
0
Hello Stefan,
You can use the .Filter() method for this purpose - set the allowed file types as a string in it:
Kind regards,
Georgi Tunev
the Telerik team
You can use the .Filter() method for this purpose - set the allowed file types as a string in it:
.FileBrowser(t => t.Browse("Browse", "ImageBrowser") .Filter("*.png,*.gif,*.jpg,*.jpeg,*.jpe") .Thumbnail("Thumbnail", "ImageBrowser") .Upload("Upload", "ImageBrowser") .DeleteFile("DeleteFile", "ImageBrowser") .DeleteDirectory("DeleteDirectory", "ImageBrowser") .CreateDirectory("CreateDirectory", "ImageBrowser")) .Render();Kind regards,
Georgi Tunev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Stefan
Top achievements
Rank 1
answered on 09 Jan 2012, 04:13 PM
Hello,
Now no error message regarding the file formats is displayed, but now the Upload Method, which I have overwritten, is not called. Although it works with the image formats.
Thanks
Now no error message regarding the file formats is displayed, but now the Upload Method, which I have overwritten, is not called. Although it works with the image formats.
Thanks
0
Hello again Stefan,
Georgi Tunev
the Telerik team
In such case I would like to ask you to send a sample project that shows your implementation so we can check it.
Georgi Tunev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Stefan
Top achievements
Rank 1
answered on 11 Jan 2012, 10:52 AM
Hello Georgi,
I am sending you the test project. To reproduce the problem please uncomment the .Filter .... method in the Index.aspx File. In our project we use the imagebrowser together with the editor or as well stand alone. We have several customers and they have tenants. So the imagebrowser provides the necessary interfaces for Authorizing the operations. As well we have to upload videos. There of course we have to use the imagebrowser stand alone. As written in the previous comment when I permit other formats( i tested that with a wmv file ) the Upload method is never called. So how could I change that behaviour ?
thank you
I am sending you the test project. To reproduce the problem please uncomment the .Filter .... method in the Index.aspx File. In our project we use the imagebrowser together with the editor or as well stand alone. We have several customers and they have tenants. So the imagebrowser provides the necessary interfaces for Authorizing the operations. As well we have to upload videos. There of course we have to use the imagebrowser stand alone. As written in the previous comment when I permit other formats( i tested that with a wmv file ) the Upload method is never called. So how could I change that behaviour ?
thank you
0
Hi Stefan,
One of the reasons not to reach the Upload controller is probably because you did not configure your application to accept larger files which are posted.
i.e.
Also make sure you override the authorization methods as mentioned in our documentation.
All the best,
Petur Subev
the Telerik team
One of the reasons not to reach the Upload controller is probably because you did not configure your application to accept larger files which are posted.
i.e.
<configuration> <system.web> <httpRuntime maxRequestLength="32768" />//32MB </system.web></configuration>All the best,
Petur Subev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Stefan
Top achievements
Rank 1
answered on 13 Jan 2012, 03:50 PM
Hi Petur,
Yes, this was solving the problem.
Thanks
Yes, this was solving the problem.
Thanks