×

Upload of some filetypes not working (psd, ai, …)

Home WPAli Support Forums WooCommerce Drag & Drop Image Upload Upload of some filetypes not working (psd, ai, …)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #690
    stainianer
    Participant

    I already have your code to allow different filetypes in my functions and also define(‘ALLOW_UNFILTERED_UPLOADS’, true); in my wp-config.php

    Nothing works.

    For ai it shows a not allowed message and for .psd it shows a image with “Wrong Format or Size”.

    #691
    Ali Khallad
    Keymaster

    Hello, when you get this message “Sorry, this file type is not permitted for security reasons.” it means that the restriction is coming from WordPress not out plugin, we can’t assist we that but we can suggest using the following code:

    function wpali_custom_upload_mimes($mimes = array()) {
    
    	$mimes['ai'] = "application/postscript";
    	return $mimes;
    }
    add_action('upload_mimes', 'wpali_custom_upload_mimes');

    For the second message, you might be just uploading a large file, try with a smaller one a see if it’s going to be uploaded or not

    #692
    stainianer
    Participant

    Filesize of both files, ai and psd, is nearly the same. I already got your code in my functions.php and i looked in the first admin-ajax.php request when uploading a file. It shows all possible filetypes:

    1 image/jpeg
    2 image/gif
    3 image/bmp
    4 image/vnd.microsoft.icon
    5 image/tiff
    6 image/svg+xml
    8 application/zip
    9 application/x-rar-compressed
    10 application/pdf
    11 image/psd
    12 image/x-photoshop
    13 application/photoshop
    14 zz-application/zz-winassoc-psd
    15 application/psd
    16 application/postscript

    You can try to upload a ai or psd here: https://www.print-tattoo.com/shop/schwarze-klebetattoos-mit-eigenem-motiv/

    upload_max_filesize is 32m

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.