In this part of the specification we'll be looking at the file structure design used in H5P packages.
The file tree structure of the H5P package is designed to enable H5P's extensive re-use of code and the wide flexibility regarding what can be packed as an H5P.
The following is an example of how the structure should look for a Fill in the Blanks task.
. ├── content │ ├── images │ │ └── explain.png │ └── content.json ├── FontAwesome │ ├── ... │ └── library.json ├── H5P.Blanks │ ├── ... │ ├── library.json │ └── semantics.json └── h5p.json
Sat, 08/18/2018 - 12:16
Library directory names
I came across the following which might be worth noting:
The example contains the library
H5P.Blanks, it is worth noting that these library directories need to be in the format "machineName" or "machineName-majorVersion.minorVersion". "h5p-blanks" will not work, even though this is the directory that is cloned from git.
Tue, 08/28/2018 - 09:35
Hi Stefan!The repository
The repository files on github are not intended to be installable copies of the libraries. They often contain build files, etc. that are addressing developers. You can however download the files and use the h5p-cli tool to automatically create an H5P library file from the repository (after building) that can be uploaded.
Sun, 02/16/2020 - 11:50
Error in uploading h5p package
I have created a test package with greeting library but I am getting below error when I try to upload it in my account content. Any help appreciated!
Validating h5p package failed.
Mon, 02/17/2020 - 22:33
Hi sagarh5p,Please make sure
Please make sure that the file you are uploading has a .h5p extension. Also when zipping the files you need to zip the files not the folder.
Sat, 05/09/2020 - 11:38
Reply to : Hi sagarh5p,Please make sure
the tutorials here are becoming really frustrating and annoying. I follow instructions on the tutorial pages and when I try it out, I get lots of red errors. Please what do you mean when you say "when zipping the files you need to zip the files not the folder"? Say in the example above, do you just zip the h5p.json file, cos thats the only file in the project folder, the others are folders.
Also when I select all the items in the project folder and zip them, and upload in at the h5p upload section in moodle, I get errors including : File "content/" not allowed ... and when I copy the files out of the content folder and place in the project folder, and zip all items in the project folder except for the content folder, and upload, it also tells me : A valid content folder is missing ... Please, tutorials on this site are very confusing and not straight to point. Already the fact that h5p has two sites h5p.org and h5p.com which are different is already confusing enough. I've been VEEERY frustrated this morning developing an h5p test app, I'll be very grateful if I got right help, in the right direction. THANKS IN ADVANCE.
Thu, 10/15/2020 - 20:51
When you upload the file, H5P
When you upload the file, H5P is complaining because it expects some flags to be set when zipping:
-D do not add directory entries
-X eXclude eXtra file attributes
So, on command line use
zip -rDX myNewFile.h
p myFolder/*for zipping. That helped me, but then the next error ocurred (https://h5p.org/node/1040154).