5

I cannot upload anything other than images using TinyMCE in Umbraco Content. I get an error:

Cannot upload this file, it does not have an approved file type

enter image description here

I have checked umbracoSettings disallowedUploadFiles, there is no docx there:

<disallowedUploadFiles>
    ashx,aspx,ascx,config,cshtml,vbhtml,asmx,
    air,axd,swf,xml,html,htm,svg,php,htaccess
</disallowedUploadFiles>

Also Developer -> Data Types -> Media Picker has Pick only images disabled. I use Umbraco 7.5.9. I can upload anything using Media section.

It seems like \Umbraco\Views\common\dialogs\mediapicker.html

        <umb-photo-folder 
            min-height="105"
            min-width="150"
            max-height="250"
            ideal-items-per-row="3"
            on-click="clickHandler"
            ng-model="images"
            images-only="{{onlyImages}}"  <!-- always true -->
            filter-by="searchTerm" />

If I manually set it to false, mediapicker would allow me to upload anything but I can't pick non-image files.

Any other ideas on what I should check?

Posted it in Umbraco issue tracking.

Andrei
  • 42,814
  • 35
  • 154
  • 218

2 Answers2

1

Sorry for posting late. I have just came across an option to allow certain files and stop all other files from uploading in umbraco. Below option is used.

<allowedUploadFiles>jpg,xls</allowedUploadFiles>

The setting is available at "config\umbracoSettings.config". If not added, we can add the setting. More information is available in the below link

https://our.umbraco.com/documentation/reference/config/umbracosettings/

Santhi Kabir
  • 291
  • 1
  • 3
  • 8
0

I realise this is a bit late, and my issue was todo with Flash (SWF) files. I was trying to add a media type (to no avail, complete newbie). Then I noticed this post, and removed swf from the umbraco config settings file and it then allowed me to upload.

From Orbonia
  • 616
  • 5
  • 16
  • Although *of course* I would not want to install any ancient SWF files on a site ;-). (I converted them using FireFox Shumway add-in to play the file, and recorded them with https://tinytake.com/ and saved the resulting mp4). – From Orbonia Sep 18 '17 at 19:24