Andrei
Andrei

Reputation: 44700

Umbraco media does not have an approved file type

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.

Upvotes: 5

Views: 4157

Answers (2)

Santhi Kabir
Santhi Kabir

Reputation: 291

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/

Upvotes: 1

From Orbonia
From Orbonia

Reputation: 686

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.

Upvotes: 0

Related Questions