• When trying to upload .ppsx into Media Library I get the following error:

    example.ppsx
    Sorry, this file type is not permitted for security reasons.
    

    Even though WordPress by default(wp_get_mime_types()) allow .ppsx, I try the following methods, but none of them works.

    First Method:
    Add the file type through my theme functions.php (Microsoft MIME Type Confirmed Here):

    function allow_file_types($mime_types){
        $mime_types['ppsx'] = 'application/vnd.openxmlformats-officedocument.presentationml.slideshow';
        return $mime_types;
    }
    add_filter('upload_mimes', 'allow_file_types', 1, 1);
    

    Second Method:
    Install plugins, which is does the exact same thing as my functions.php method.

    Third Method:
    Open up all file types through wp-config.php, but this has a security risk and not ideal.

    define('ALLOW_UNFILTERED_UPLOADS', true);

    Have anyone exprience the same issue? If so, please let me know how did you fix it. Thank you

    • This topic was modified 5 years, 3 months ago by Farhad.
    • This topic was modified 5 years, 3 months ago by Farhad.
    • This topic was modified 5 years, 3 months ago by Farhad.
Viewing 9 replies - 1 through 9 (of 9 total)
  • The ppsx extension is in the list, but your file info must match exactly the actual mime-type that is in the code.

    Have you tried Lord of the Files plugin? The author is very helpful, and eager to find all the edge cases, so if it doesn’t work, ask at the plugin’s support forum.

    Thread Starter Farhad

    (@farhaddc)

    @joyously The file info does match as is in the code, I even create a dummy .ppsx file to double-check.

    I try Lord of the Files, it bypasses the file upload and changes the .ppsx to .pptx on upload, then when I download that file again and try to open it on my computer I get the following error from Microsoft PowerPoint:

    PowerPoint can’t open this file because its file extension has changed. Make sure the format of the file matches the file extension.

    • This reply was modified 5 years, 3 months ago by Farhad.

    Hmmm, maybe @blobfolio would know more about that.
    Could you say what operating system you created the file on? What program?
    Did you remove your code before trying the plugins?

    Thread Starter Farhad

    (@farhaddc)

    Operating System: Mac OSX
    Microsoft PowerPoint 16.31

    I remove code, the issue still exists.

    • This reply was modified 5 years, 3 months ago by Farhad.

    @farhaddc Are you able to send me an example PPSX file and PPTX file that were both created with (and work with) your version of MS Office? (Maybe just create two new files each with a simple “Hello World” slide or something.) I don’t think you can attach files here, but you can at https://github.com/Blobfolio/blob-mimes/issues/new .

    Please also include the debug information you get when testing each of those files on your WordPress site via Tools > Debug File Validation (that admin page is available when you have Lord of the Files active).

    That should give me a trail to follow to see A) why your site is doing what it’s doing and B) what might be done to fix that! ??

    Thread Starter Farhad

    (@farhaddc)

    @blobfolio Thank you for the quick response. I couldn’t upload .ppsx into Github repo you provided. The file type was not allowed (Look like GitHub has an issue with .ppsx too).

    But I upload them to my Google Drive, please let me know once you download them so I can remove them.

    PPSX: https://drive.google.com/file/d/1peVL-zCmMLFubWa40h0fBnW8aMcvkYrf/view?usp=sharing
    PPTX: https://drive.google.com/file/d/1zBLs89ypW2sKvDcSQEOgjGndagBw9hVL/view?usp=sharing

    I use Github to post my File Debug Validation: https://github.com/Blobfolio/blob-mimes/issues/11

    Thanks @farhaddc! I’ll take a look and let you know what I find out (probably later tonight or tomorrow).

    Thread Starter Farhad

    (@farhaddc)

    @blobfolio Awesome, Thank you!

    A quick update for posterity:

    This issue should be fixed for sites running Lord of the Files >= 1.0.0. ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘WordPress default .ppsx upload to Media Library not working’ is closed to new replies.