Can't upload image in Course Presentation and Hotspot image

Discovered today that I can't upload JPG or PNG images into a slide in the Course Presentation format or into a Hotspot image. I get an error message 'File type isn't allowed' (see screenshot). The only way to upload an image is if it's saved as PNG HD. Can you please follow up as we have a number of resources at our university that require images in the Course presentation and Hotspot image H5P tool. 

Thanks.

Attachments: 
Content types: 
BV52's picture

Hi,

I tried reproducing the issue but I am unable to do so. Please provide the information below:

  1. Platform and version number. E.g. Drupal, Wordpress, Moodle.
  2. Mobile or Desktop
  3. Browser: Chrome, Firefox, Safari etc
  4. H5P plugin version
  5. H5P content type and version (if a content type was used).
  6. Any browser console errors
  7. Any PHP errors
  8. Attach a sample file that you cannot upload

If it worked before:

  1. Any recent changes to the environment (new plugins/modules, updates, configuration changes etc.)
  2. Any recent changes to the browser you're using (new extensions, updates etc.)

The more information you provide, the quicker the community will be able to fix it and the quicker you'll have a working solution!

-BV

Hi BV,

I use Chrome and the h5p.org to create new activity content (our university does not have an H5P plugin so we use the activity embedding code directly from the H5P.org site). The image upload problem exists for both me and my colleagues on various Dell PC desktop and laptop computers.

Just now I tried again on Chrome, Firefox and Internet Explorer and none of them work -- I selected the Course presentation format and then tried to upload a JPG to a slide but got error message (see screenshot). Also attached is the image I was trying to upload to the Course presentation slide. 

Alice

BV52's picture

Hi Alice,

I'm not really sure why but when I downloaded the file the extension is not JPG but JIFF. I simply changed the file extension to jpg and I was able to upload the image in Course Presentation.

-BV52

I am having the same issue. Tried saving the image as a JPEG and PNG and both are giving me the same error as the person above mentioned. 

I'm having the same issue as above. I've tried saving as a JPEG and PNG and both giving me the same error message. 

BV52's picture

Hi,

Would you mind sending the jpg file to my e-mail [email protected] I'm suspecting that I am not downloading a fresh file if I do this from this site. I may be able to find out more if I download it from my e-mail and try to upload it.

Also if I may ask what software did we use to create/save this file?

-BV

I seem to be having the same or very similar issue. Starting around this week I can no longer upload png files. If I convert the image to "transparent" png (or png hd) then it uploads OK. The odd thing is that files I can't even upload the exact same files I uploaded successfully a couple of weeks ago. I noticed after experiencing the problem that there is an update to the Presentation module, and applied it but it made no difference. The difference between my installation and others here is that I am using h5p in Moodle. And as I write this I have just remembered a Moodle update on 1 November to install an update to the h5p plugin. The current version is 2019101700. Possibly this is what introduced the problem? Is there a setting somewhere to define allowed image types?

I think I found the problem (at least for me). I tried to find exactly what the difference was between my png and "hd png" files. Got side-tracked into a lengthy investigation into the file contents, alpha channels etc. Then noticed that the working file's extension was lower case where the failing files have upper case (and have always had this). Renamed the file to a lower case extension, tried to upload again and success! Looks like somewhere a test for valid filetypes is looking at file extensions and is too restrictive.

The issue for me is that these files are produced by exporting a Powerpoint as images, and microsoft in its wisdom gives all the images a ".PNG" extension. So until this is fixed I need to modify the extensions on all the files before I can use them. Good to have a simple workaround now, and hope it works for others on this thread.

BV52's picture

Hi Qualitykev,

Thank you for reporting this. I was able to reproduce the issue using a .png file but not a .jpg file. I filed a bug report so that the core team can fix the issue.

BV52's picture

Hi Everyone,

Just an update the issue is only happening if the file extension is in uppercase. Changing the extension to lower case resolves the issue.

-BV

How do you change the file extension to lowercase?  

BV52's picture

Hi NIki,

It depends on the OS that you are using. If I'm not mistaken in Mac the file extension is shown by default. In Windows you need to go to settings and in the folder options there should be a tick box there that says "Show extension for known file types. A visit to Google should give you step by step instructions for your specific OS ;-)

-BV

You are my Hero right now. I couldn't figure out what I was doing wrong. Lowercase was the solution. 

Great to see this appears to be fixed in the 2019111300 plugin release. Very fast turnaround. I'm impressed!

BV52's picture

Hi All,

Just an update on this issue. H5P.com and Moodle is working, the core team is working on a fix for the other platforms.

-BV

I'm having the same problem - can no longer upload images.  Is there a fix to this problem if JPEG HD is not an option?

BV52's picture

Hi elwalsh,

The issue is not related to the file type. Instead it's a whitelist issue where anything in upper case is not accepted. Changing the file extension to lower case 'fixes' the issue.

-BV

Arthur Wohlwill's picture

I made a montage of images in powerpoint and then converted that powerpoint into  JPEG, PNG, and GIF files. These would not upload. The largest file size was 962 KB. I tried to upload one of the original file (Which was downloaded from the internet) and it worked (both PNG and JPEG).

BV52's picture

Hi Arthur,

Can you please check the suffix or file extension if it is in upper or lower case. The bug I mentioned above affects almost all file types if the file extension is in upper case changing it to lower case fixes the issue. However if the file extension is in lower case but you still cannot upload it please provide the information below:

  1. Platform and version number. E.g. Drupal, Wordpress, Moodle.
  2. Mobile or Desktop
  3. Browser: Chrome, Firefox, Safari etc
  4. H5P plugin version
  5. H5P content type and version
  6. Sample file that you are trying to upload.

-BV

I'm having the same issue on wordpress . I changed the extensions to lower case but nothing changed . As I still have "Unabletocopy" error message . Would you please mind helping on how to solve this ? Or at least is there any solution on how i can save the other files then i reinstall the plugin again ? 

 
BV52's picture

Hi The Speaking Cats,

This looks like a totally different issue. Would you mind providing the following:

  1. Detailed steps to reproduce the bug (exactly how and when did it happen)
  2. Platform and version number. E.g. Drupal, Wordpress, Moodle.
  3. Mobile or Desktop
  4. Browser: Chrome, Firefox, Safari etc
  5. H5P plugin version
  6. H5P content type and version (if a content type was used), and a sample URL or attached H5P.
  7. Any browser console errors (ctrl+shift+J or F12)
  8. Any PHP errors
  9. Screenshots if it's a visual problem

If it worked before:

  1. Any recent changes to the environment (new plugins/modules, updates, configuration changes etc.)
  2. Any recent changes to the browser you're using (new extensions, updates etc.)

The more information you provide, the quicker the community will be able to fix it and the quicker you'll have a working solution!

-BV

Hello BV52 , 

sorry for my late response. 

The issue is constantly happening with the lesson I am creating . I tried that with different content types especially branching senario and presentation . 

1-Whenever i upload a picture ( eventhough , I've deleted the pictures and tried to save but the problem still the same as shown in the screenshot  attached.)

2-Wordpress 

3-Desktop

4-Chrome 

5- Plugin version (Version: 1.15.0) 

6- Link for an example : https://thespeakingcats.com/course/kids-free-trial-class/lessons/freeclass/

7- browser console error :                not available

load-scripts.php?c=1…postbox&ver=5.3.2:8 JQMIGRATE: Migrate is installed, version 1.4.1h5p.js?ver=1.15.0:976 Unable to find constructor for: H5P.BranchingScenario 1.1h5p.js?ver=1.15.0:1115 Uncaught TypeError: Cannot read property 'getCopyrights' of undefined at Object.H5P.getCopyrights (h5p.js?ver=1.15.0:1115) at HTMLDivElement.<anonymous> (h5p.js?ver=1.15.0:174) at Function.each (jquery.js?ver=1.15.0:2) at init.each (jquery.js?ver=1.15.0:2) at Object.H5P.init (h5p.js?ver=1.15.0:93) at HTMLDocument.<anonymous> (h5p.js?ver=1.15.0:2821) at c (jquery.js?ver=1.15.0:2) at Object.fireWith [as resolveWith] (jquery.js?ver=1.15.0:2) at Function.ready (jquery.js?ver=1.15.0:2) at HTMLDocument.H (jquery.js?ver=1.15.0:2)       ​  

 

8: PHP error : I don't know how to verify it ! 

Attachments: 

Now i have started getting unabletocopy error message . When i try to download it gives me an error 404 . Guys please , if there is a premimum version let us know , because really it's so annoying like this , I have lost the work of 2 months in a second !! it's a lot of energy and time that I have lost till now . I do  understand your efforts but  we are also losing now. Please help us to solve this issue permanently. Thank you in advance

 
Attachments: 
BV52's picture

Hi Speaking Cats,

Please include a screenshot of the browser console.

-BV

The screenshot is attached

Attachments: 

Today I've tried to use a different content type ( presentation ) and i got the same error. unable to copy .

Please find the screenshot attached.

Attachments: 

Hello

I have also been having the same issues with uploading image files to my Image Hotspot. I try to upload an image with the file type jpg and size below 16 MB but it still gives me the "File type isn't allowed". All the images are jpg and below 1 MB in file size. I do not understand why I can't uplaod an image to my Image Hotspot.

BV52's picture

Hi Kirk,

I think I answered this question here in the same thread.

-BV

tocto's picture

The problem with the upper case file extesnion still exists for the wordpress plugin. Would you add this to your agenda? (I am using many Power Point exports which are all upper case an i might not be the only one. ;-)

TeaKayB's picture

Hi,

I'm trying out the new AR Scavenger content type (using the H5P plugin for Wordpress) but I can't get it to work as whichever 3D model file I try to add I get a "File type isn't allowed" error. I've downloaded a couple of 3D models from Sketchfab and checked they're the right format (the ones I've tried have all been .glb as specificed) and they open as intended in the Windows 11 3D viewer. I hoped I'd found the solution in this thread, but the file extensions are already lower case so it's not that. I know this thread isn't about AR Scavenger, but it is about a "File type isn't allowed bug" and I couldn't find anywhere to post things about AR Scavenger so this is as relevant a topic as I could find!

I've done some googling and tried using a tool to combine the .glb and .bin files as I've seen some people talking about for other applications. The resulting file loads in Windows 3D viewer but still results in "File type isn't allowed" when trying to add it to AR Scavenger.

I'm not an experienced user of 3D files so I'm sure I'm doing something wrong but I can't work out what it is.

Any ideas?!

 

Tom

otacke's picture

Hi!

This is an issue with the WordPress plugin. It requires to allow the suffixes .glb and .gltf for files, but needs a newer version of H5P core to do so cmp. https://www.olivertacke.de/labs/2020/08/02/arrrrrr-ar/). I hope the H5P core team is going to release an update of the WordPress plugin using a later version of H5P core soon.

A workaround for now is to patch the list of allowed file types.

  • Find the h5p.classes.php file on your server. It should be located at your-wordpress-path/wp-content/plugins/h5p/h5p-php-library/h5p.classes.php.
  • Find the line that contains the list of allowed file types. Should be line 2024 for the current version of the WordPress plugin (1.15.3).
  • Add glb and gltf to the list.

Best,

Oliver 

TeaKayB's picture

Thanks Oliver, that makes sense!

 

Tom

Hi Oliver,

I am having the same issue but on h5p plugin in moodle is there a workaround for this problem?

otacke's picture

Hi hammad5p!

Yes, it's the very same steps, it's just the files that are different. Here it is:  https://h5p.org/node/1257381 - easily retrievable by puttinh "gltf" into the "search h5p" input field at the top.

Best,
Oliver

Hi, 

I read everything above and can't figure out what to do. I cannot add jpg filed to my memory game. I tried png as well, but no cigar. Is there a certain type that does work? I can convert all my images becausen one of the solutions above seem to work. Wich is weird since they are very standard image files....