Static files deleted on publish

Are you looking for help?

This is a support forum for reporting issues related to Backendless services. Please note that due to our support policy we cannot provide you help with debugging your code, consulting in regards to any language or third-party library usage. For this kind of questions we recommend using more appropriate forums like Stack Overflow.

In order to suggest you a quality solution, we shall usually ask you to provide the details mentioned below first. Including them into your topic right away helps us to start investigating your issue much faster.

In case you have a suggestion or an idea, the details below are not always required, though still any additional background is welcome.

Backendless Version (3.x / 6.x, Online / Managed / Pro )

Client SDK (REST / Android / Objective-C / Swift / JS )

Application ID

Expected Behavior

Please describe the expected behavior of the issue, starting from the first action.

Actual Behavior

Please provide a description of what actually happens, working from the same starting point.

Be descriptive: “it doesn’t work” does not describe what the behavior actually is – instead, say “the request returns a 400 error with message XXX”. Copy and paste your logs, and include any URLs.

Reproducible Test Case

Please provide a simple code that could be run in a new clean app and reproduce the issue.

If the issue is more complex or requires configuration, please provide a link to a project on Github that reproduces the issue.
I have placed my static pages in the /web directory
(for example /web/pagename.html)

when i publish a page made through ui builder, all the files in /web are deleted
I even created a sub directory /web/static
but that directory and all files are deleted as well

Please advise what I am doing wrong

Thanks

Paul McPherson

Hello, @Paul_McPherson.

I am assuming that you have already published in this folder, so the files are simply overwritten with new ones.
Also, you need to not only create a folder, but also mark it. Most likely, you still had the web folder selected, so the application was published there.

Best Regards, Nikita.

I’m sorry, I don’t understand your answer. Mark a folder? What does this mean?

What is the name of the folder that you must publish your ui builder files to?

Is it root / ?
Is it /web ?
Is it something else?

Please answer this - Why are all files that I manually put in /web deleted on publish? i.e. (some_static_page.html)?
Why are all sub-directories of /web deleted? /web/somefoldername?
Is there a way to avoid this?
is there another folder that I can put it in that will deliver the static pages without deleting them on publish? i.e /somename?

Please reply.

Thank You

Must you gio to Root (?) ? /web /some other?

1 Like

Replacing all files in the directory where you are publishing your app is just assuming by design. If you want to avoid it, you can publish, for example in web/another-folder and move files manually from another-folder to web.

You can put your static anywhere you want, but you should remember that might be replaced by new published app. So, if you won’t it, just don’t publish in the directory where you have your own files.

Tell me if something is still unclear.

Regards, Dima.