|
Sweet Home 3D Forum » List all forums » » Forum: Developers » » » Thread: Autosave 3djs |
||
| Print at Dec 15, 2025, 7:21:30 PM |
|
|
| Posted by kingoftailor at Jun 8, 2022, 11:28:29 AM |
|
Autosave 3djs Hello Emmanuel, Renaud, I tried to set it to automatically save changes to the file when editing an empty sh3d file, but it returns an error 500. I have added the following to the currently working planner: var application = new SweetHome3DJSApplication( { readHomeURL: urlBase + "readHome.jsp?home=%s", writeHomeEditsURL: urlBase + "writeHomeEdits.jsp", closeHomeURL: urlBase + "closeEditedHome.jsp?id=%s", furnitureCatalogURLs: [urlBase + "lib/resources/DefaultFurnitureCatalog.json"], furnitureResourcesURLBase: urlBase, texturesCatalogURLs: [urlBase + "/lib/resources/DefaultTexturesCatalog.json"], texturesResourcesURLBase: urlBase, userLanguage: "hu", autoWriteDelay: 2000, autoWriteTrackedStateChange: true, }); What else should be set up for autosave to work? Thanks, Gábor |
| Posted by Puybaret at Jun 11, 2022, 1:31:07 PM |
|
Re: Autosave 3djs Errors 500 should generate some logs on server side. Did you check them? ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by kingoftailor at Jun 14, 2022, 6:39:31 PM |
|
Re: Autosave 3djs I resolved the problem. Lack of write permission to folder caused the error. I have only one problem. I can not able to delete the sh3d files from the apache homes folder. I have got exception: System.UnauthorizedAccessException: Access to the path 'xxxx.sh3d' is denied. I don't think the apache server will allow deleting. All rights are granted to the iis user. Copying (creating) and modifying also works well. Is there a method available in javascript to delete this file? |
| Posted by Puybaret at Jun 15, 2022, 6:22:04 PM |
|
Re: Autosave 3djs There's no JavaScript method to delete a file in client file system, and even more dangerous, on a remote server file system. ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by Daniels118 at Jun 16, 2022, 8:00:27 AM |
|
Re: Autosave 3djs Maybe you still have wrong permissions, please post the output of 'ls -la' on that directory and 'id httpd' (or whatever your apache user is). |
| Posted by Puybaret at Aug 12, 2022, 5:45:30 PM |
|
Re: Autosave 3djs It would be nice to post the solution once you resolved your issue. This forum isn’t here just to ask for help, but also to share solutions. ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by adizanni at Feb 15, 2024, 8:51:22 AM |
|
Re: Autosave 3djs Hello all, I'm also stuck on the delete topic. I've encapsulated the jsp solution into a local web solution (very much like the online version of SH3D. I managed to have all use case covered (edit, new, etc) except the delete. No significant log messages are raised in the Catalina logs. Please help. |
| Posted by Puybaret at Feb 15, 2024, 9:30:17 AM |
|
Re: Autosave 3djs Do you mean that the method delete of java.io.File did not work? If yes, check the permissions on the SH3D files you manage on the server and maybe on the folder where you store them. By the way, it would be nice to explain what you try to achieve. ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by adizanni at Feb 15, 2024, 10:29:27 AM |
|
Re: Autosave 3djs Hello thanks Emmanuel for the rapid answer, Yes using the delete of java.io.File. I'm currently working in Eclipse on Windows and deploy Tomcat as a Target runtime, not clear which permission I have to look into. The properties of the Homes folder inside WebApp give only the possibility to set or unset "ReadOnly" and it is unset (I can create and edit existing files). What I'm trying to do: I'm the developer of this card : https://github.com/adizanni/floor3d-card in Home Assistant (home automation software), I'm trying to build a Home Assistant add-on to encapsulate SweetHome3D inside the Home Assistant frontend and also migrate my existing SweetHome3D plugin: https://github.com/adizanni/ExportToHASS to JSP. By the way, I'm a big fan of your work.... Thanks in advance for the support. Andrea |
| Posted by adizanni at Feb 15, 2024, 1:20:50 PM |
|
Re: Autosave 3djs Hello, sorry if I made you lose time, but I discovered a bug in the JSP, now it is working as expected. Hope you did not lose time to look into it. |
|
|
|
Current timezone is GMT Dec 15, 2025, 7:21:30 PM |