Window 10 content zip error on uploads
Hi, i am having an issue with zipping/uploading h5p content files. wondering if you have any ideas? seems like somthing has changed as this has worked fine in the past.
i create a Course Presentation (crurent version) and download. on testing, I can upload this download file fine. Windows 10 v1803 on a Surface Book 2.
if i repack it with 7Zip as a zip file and try to reload it i get this error.
No changes to any files, just repack at the root level. I can recreate on other win10 machine. using Chrome Version 77.0.3865.90 to upload
Files Enclosed
error code
Validating h5p package failed.
File "blob-1.0/" not allowed. Only files with the following extensions are allowed: json png jpg jpeg gif bmp tif tiff svg eot ttf woff woff2 otf webm mp4 ogg mp3 m4a wav txt pdf rtf doc docx xls xlsx ppt pptx odt ods o
thanks for any ideas.
John
serettig
Sun, 10/13/2019 - 08:38
Permalink
The reason why you get this
The reason why you get this error is that the package validator does not accept packages in which there are zip entries for directories. Normally, when exporting H5P packages with the library, these are omitted and the zip file only contains entries for files. It look like 7-Zip does it's zipping in a different way and that's why you're seeing the error. I'd suggest trying another zip tool for this or writing a script to remove the directory entries.
Johnjdooley
Mon, 10/14/2019 - 18:53
Permalink
not sure if follow.. i don't
not sure if follow.. i don't see zip files in the h5p package. is that what you are seeing/saying?
seems like something has changed as i have done this many times before. i have tried a bunch of different zip tools but that all fail to load. the error seems to interpret the relative path as a file vs a directory.
thanks for your thoughts.
john
studyaid
Wed, 10/16/2019 - 02:57
Permalink
The package can still be created with 7-zip command line
The instructions are int this post.
https://h5p.org/comment/29623#comment-29623
serettig
Tue, 10/15/2019 - 09:17
Permalink
The H5P "package" is a zip
The H5P "package" is a zip file that only has a different file extension (.h5p instead of .zip). A zip file consists of "zip entries", which can be files and directories. The H5P package validator does not accept packages that contain zip entries for directories. These are not necessary strictly speaking, as a zip entry for a file can have a path like "directory/file.txt" without the zip entry "directory/" existing.
I'm not sure if you're using the command line version of 7-Zip, but you might want to check out this superuser post concerning excluding directories when creating zip files.
papi Jo
Tue, 10/15/2019 - 12:12
Permalink
I've had the exact same
I've had the exact same problem, and serettig has tried to help, but I still do not know how and why it happens (sometimes but not always)...