.h5p as ZIP

Forums: 

Hello,

 I have a question regarding .h5p format. When I create a H5P project, zip it and rename .zip to .h5p it doesn't work, talking about zipping on Windows.

But when I use linux and zip it through bash like this:

 

zip -r -D -X project.h5p *

everything works just fine. I am writing final report about H5P for developers and I would like to explain why is it not working on renaming a clasical Windows zip.

Can you tell me why this happens?

 

Thanks.

 

otacke's picture

Hi!

What does zipping on Windows mean here? You should be able to run the same command as on Linux and should get the same result. I assume you're zipping using Windows inbuilt option from the Explorer's context menu, and that will most likely not use the -D flag and -X flag when zipping, hence the problem.

Apart from that: zipping manually is not recommended anyway as mentioned multiple times on this forum. The recommended way to pack H5P libraries is the H5P CLI tool.

Best,

Oliver 

"I assume you're zipping using Windows inbuilt option from the Explorer's context menu, and that will most likely not use the -D flag and -X flag when zipping, hence the problem."

Yes, that is my question, why is that the problem? What happens when we zip manually that creates the problem?

" assume you're zipping using Windows inbuilt option from the Explorer's context menu" - this exactly is my question, why doesn't this work? If .hp5 is only zip file after all. Why does it need special flags?

otacke's picture

Hi!

I am not sure if I understand the question. It's a zip file. A zip file can be compressed with a couple of different options, but it's still a zip file. Just because Windows does not apply any flags doesn't mean this is more right or wrong than applying some flags.

I don't know why the H5P core team decided to use those flags, but I fail to see the issue with that. And again, zipping manually is not recommended anyway.

Best,

Oliver