Wp-calypso: Media Library: AT and simple sites unable to upload .ppsx

Created on 26 Jan 2019  ·  34Comments  ·  Source: Automattic/wp-calypso

Steps to reproduce

  1. On either a simple or an AT site, try to upload a .ppsx file to the Media Library via Calypso.
    sample-ppsx.ppsx

What I expected

What happened instead

  • Error displayed: 1 file could not be uploaded because an error occurred while uploading.
  • Tested in wp-admin > Media > Add New and error thrown: “sample-ppsx.ppsx” has failed to upload. Sorry, this file type is not permitted for security reasons.

Context / Source

  • User report: 1744326-zen (Es support)
Media [Type] Bug

Most helpful comment

Fixed in r187312-wpcom

All 34 comments

Als reported in 1744341-zen (es support)

Similar issue with identical error: #30251

Found a similar issue here: 297-gh-atomic, but that pertains only to AT sites so starting a new thread, as this is also affecting simple sites.

It is worth mentioning that this is happening on simple sites as well (e.g. 1744341-zen)

For AT sites as a temporal fix you can install this plugin:

https://wordpress.org/plugins/wp-add-mime-types/

And then add this value:

ppsx = application/vnd.openxmlformats-officedocument.presentationml.slideshow

Another affected user #1759137-zen (es support)

Also reported in #1754236-zen (es support)

Another one #1765647-zen.

Another report in the forums

1780375-zen

Noting that as per 1780375-zen and @AtrumGeost comment, I have tried to use a workaround with the following snippet:

function gma_zen_1780375_custom_upload_mimes($mimes = array()) {

    $mimes['ppsx'] = "application/ppsx";
    return $mimes;
}
add_action('upload_mimes', 'gma_zen_1780375_custom_upload_mimes');

as well as with $mimes['ppsx'] = "application/vnd.openxmlformats-officedocument.presentationml.slideshow", but this didn't work and I keep seeing the same error message.

This snippet however works for other blocked types, like .kml.

Another in 1790582-zen

Fixed in r187312-wpcom

User is still having trouble uploading a .ppsx file to their site. I was able to replicate the issue

1780375-zen

@thabotswana Could you please re-open again with more details on the steps to duplicate? I'm going to close as no other reports have come in since the fix.

Yes. I was able to replicate the issue again following these steps:

  1. SSP as the user familymentalwealth
  2. Go to My Site -> familymentalwealth.com
  3. Go to the Media Library
  4. Upload the file StS-Lessons-v11.ppsx

After a few minutes, the upload fails to complete and an error is displayed

screenshot

However, I was able to upload the file in WP Admin

1780375-zen

Thanks for the additional details. Looks like an Atomic site — we might not load the mu-plugin helper file in that context. CC @xknown

@thabotswana can you please upload somewhere else the StS-Lessons-v11.ppsx file so I can reproduce this issue? Thanks!

Added some code in r190173-wpcom, it should probably fix the issue but given that I don't have a file to test I wasn't able to confirm.

@xknown you should be able to download the file from this link:

https://drive.google.com/file/d/1vqr0VSqVcdRb4XII5dH8xptoGd_fq8Zk/view?usp=sharing

@xknown you should be able to download the file from this link:

https://drive.google.com/file/d/1vqr0VSqVcdRb4XII5dH8xptoGd_fq8Zk/view?usp=sharing

@thabotswana It looks like the commit above fixed this issue, I was able to upload this file to my test site without any problems.

@thabotswana 1780375-zen was auto-marked as resolved as was left "pending" , I've asked them to test again on 1949135-zen

Thanks for the updates, @xknown — I'll close this and HEs please re-open if you hear back that things are not working as expected.

@lancewillett I have a report of this happening with .xlsx files now. The user is on a simple site, and it's happening in both Calypso and wp-admin. I downloaded one of their xlsx files from their media library and attempted to upload it to a test site and got the same message. So it's something in our system that's changed recently as they have been successfully uploading these in the past.
I'll re-open this issue, but can move it or start another if that's better.

1995637-zen

@nickpagz Please ping @xknown privately with the file in question so he can test the existing patches.

1990419-zen

User tried uploading Tower-of-Babel-Lesson.ppt. File size was 7.1Mb and was a *.ppt file created in LibreOffice 6.0.2. Uploaded using Firefox 66.0.3 (64-bit). On our suggestion they tried in Calypso and WP Admin with no luck. We were able to reproduce it on our end. The file can be found in the ticket.

They receive the error: Tower-of-Babel-Lesson.ppt HTTP error. They tried re-saving the file and, again, get the following security error: Sorry, this file type is not permitted for security reasons.

Smaller files seem to work. The one that uploaded without any issue was 5.8~Mb. Its just getting into the mid 8Mb range that I run into snags on *.ppt files.

We've received a report of this happening with an .xls file in this thread — there is a link to the file there. Trying to upload this file on a test site resulted in the following error:

Child Phonology Analyzer 6.4.xls” has failed to upload.
Sorry, this file type is not permitted for security reasons

Noting the file size is only 4.4MB.

@gemmagarner I committed some code to address some of the recent issues, are you still unable to upload the file you mention? I can upload it without any issues.

Thanks @xknown! The file is now uploading for me — I'll follow up with the user and let you know if there any more problems.

User reported that they received this file type is not permitted for security reasons when attempting to upload a .PPSX file via both Calypso and WP-Admin.

As a workaround, user opted to resave the file, and future files, in PPS and PPTX formats in order to upload.

12536259-hc

There are a few times when the file does get uploaded to the site, but we continue to see the error. Refreshing media library or check media library on wp-admin shows the file, as expected. I haven't been able to reproduce this actively, but ran into an user report - 2643884-zen

I had a user on 24777383-hc who reported being unable to upload ppt files. I was able to replicate it on my end. I couldn't upload their and my own ppt file on my own test sites as Calypso kept showing the error 1 file could not be uploaded because an error occurred while uploading..

I was able to upload the file after installing this plugin: https://wordpress.com/plugins/disable-real-mime-check - however, it only worked on wp-admin -> Media Library. Calypso didn't work even with this plugin active.

Another report of this in 25501701-hc.

I provided the following workarounds in 3487631-zd.

  1. Convert to .PPTX files, which work.
  2. Install the plugin called wp-add-mime-types, and add the code ppsx = application/vnd.openxmlformats-officedocument.presentationml.slideshow to the plugin settings via wp-admin > Settings > Mime Type Settings.

reported on #25833306-hc

Was this page helpful?
0 / 5 - 0 ratings