Joined: Sep 10, 2012
Post Count: 31
Status:
Offline
HTML5-Viewer with CMS - Error-Message
hello,
after a long time...jaust a question, maybe juast for better understanding. i created a small model, did an excport to html5. i got a zip-file. as i understand, i have to extract this zip ONCE, then put the folder to a folder on a webserver, becaus i have to access the lib and the html-pages directly. inside the folder ther is again the model as zip. i put a content-element to my pages for pure html, stripped the code of one of the html-files and pasted it to the editor. to be sure to hit all the JS, i put absolute, no relative paths to the code. works to this point. the canvas is displayed, and it starts loading the model, using the "xxxmodelxxx.zip". but then i get an error: "Error: Error End of data reached (data length = 0, asked index =4). Corrupted zip?"
Do i miss something important to edit? could be i'm to tired actually to see it ;)
----------------------------------------
WIN10 Pro 64bit * 16 GB RAM * AMD FX 6100 * Geforce GTX 660
France
Joined: Nov 7, 2005
Post Count: 9423
Status:
Offline
Re: HTML5-Viewer with CMS - Error-Message
Could it simply because you tried in a local file system without a web server? Many browsers don't allow to access to local files anymore for security reasons. Try with Firefox, it's generally more tolerant.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Joined: Sep 10, 2012
Post Count: 31
Status:
Offline
Re: HTML5-Viewer with CMS - Error-Message
it works now. for explanation, it's inside a typo3-cms. the absolute path was of course the wrong way. the realtive solved the problem. i just have to edit some more things, but it's running now on all available devices. only thing to solve will be to make the canvas dynamically responsive. but not today ;) if you like to have a short look, it's a not released page of my new pages: https://factor118.de/index.php?id=87 i'll keep you updated if i found the adjustments for responsive pages. guess ther might be also some changes needed for touch-navigation, but not that important at this moment. doin such things when tired - stange thing, need to sleep...ah, but just let me check the last edit ... ,)
----------------------------------------
WIN10 Pro 64bit * 16 GB RAM * AMD FX 6100 * Geforce GTX 660
Russia
Joined: Aug 11, 2017
Post Count: 135
Status:
Offline
Re: HTML5-Viewer with CMS - Error-Message
Dear Puybaret, could you please help me? I try to put the script on landing page constructor platform, but get the same error - "Error: Error End of data reached (data length = 0, asked index =4). Corrupted zip?"
Support team cannot help to solve this, said to ask you what's wrong with the script
France
Joined: Nov 7, 2005
Post Count: 9423
Status:
Offline
Re: HTML5-Viewer with CMS - Error-Message
By default, the security of modern browsers forbids a script to access multiple domains from a page (here opl5d19z.plp7.ru and regard-house.ru). The easiest way to fix this issue is to host Sweet Home 3D JS Viewer scripts and SH3D file on opl5d19z.plp7.ru. Maybe this page will give you some help too.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Russia
Joined: Aug 11, 2017
Post Count: 135
Status:
Offline
Re: HTML5-Viewer with CMS - Error-Message
Thank you for your answer!
Unfortunatelly, the Landing Page Constructor platform doesn't allow to host any user files; just constructing pages and put own HTML code into head and body if needed.
I tried to get how CORS works and what should I write in html to get regard-house resources as own, but haven't succeed.