Error downloading files from remote target

I want to download zome files from a remote target from the “Site Manager” tab:

When I click “Download” from the menu after right-clicking a file, like this:

The following error is thrown in the console:

invalid output path: directory "C:\\Users\\emiel\\Wappler\\Project123\\public\\public" does not exist
Error
Error downloading public/public/uploads

Seems the “public” element is in the path incorrectly there, but not sure if that’s the issue.

Any way to successfully download files this way or through another method?

What is your project root setting set to?

That’s set to /public:

image

Do you think changing to / might fix this download issue?

Yes, the root folder should be set to the app root, not the public folder.
From screenshots i assime your app root may be "/node_app".
With your current settings publishing will put the entire website structure into your public folder

Thanks for explaining. Gave this a try, File Manager updated the file tree properly and all folders and files were copied automatically to the new root folder (from /public/ to /) by Wappler. (Relative) file paths are correct (e.g. dmx script paths and all other relative paths like theme files etc.) in the code, but somehow loading files is not working properly, logically breaking the site. Tried a lot of things to refresh the server to make the new file locations work properly, but without result. All file links (dmx scripts, server connect/api, theme files, assets) are broken it seems. Any idea how to get the (Wappler local node) server to load the files correctly?

Can you show a screen shot of your folder structure as it is now

Found the cause and fixed it. These folders were copied to the new root folder / by Wappler after changing the web root folder in the project settings, but should have stayed in /public/ folder:

/assets
/css
/js
/images
/uploads
/fonts
/vendor
/dmxAppConnect

I moved those folders back to the /publicfolder and now everything loads fine.

No security issues caused by this folder structure, right?

1 Like

looks ok to me. Not sure about vendor folder, dont normally see that in a node.js app structure

Oh that’s a theme folder, but thanks for pointing that out :folded_hands: