Purging the publish folder

I’ve updated today to the current version 8.5.x after a long time.

When publishing the app to my ftp server, I noticed that the content of the target directory was completely deleted before upload. Since my app creates data in sub directories, this is not a good idea. Can I turn this off completely or at least exclude directories from deletion?

Unfortunately, no. You need to put the additional files someplace else on the server, or include them in your upload.

I can’t upload them because they are created by the user while he is using the app. They should not be deleted by updating the application.

You cannot assume every file in that folder belongs to the application. E. g. i’m using dompdf, a framework to create pdf files. It’s pretty large and gets always deleted and uploaded every time the app is published. That is not practical.

I need a way to exclude folders from beeing touched by publish.

You’ll need to put them someplace else. The upload sends the complete folder, wiping out what was there before.

I’m software developer for more than 40 years now, using NSBasic AppStudio since 2011 and honestly a bit shocked that you do not agree that this is a very bad practice and at least a big breaking change.

It’s not that simple.

Are you using ftp or sftp?

I select “Deploy to Local Folder” and transfer it using the Windows Explorer with ftp.mydomain.com

I have to disagree with your 40 years of developing.

Putting programs in the same folder as data is a big bad practice. Programs should be set to access execute/read only, while data is read/write.

Programs should be in a folder with permissions set to read only/execute.

Data should be in another folder with read/write permissions only for validated users.

Using folders instead of file based permissions is also easier to manage, especially if more than one developer is working the project.

Best practices are good for apps you’re distributing, but for your own use, doesn’t matter.

@GaryGorsline - Exactly.

@CProbst - are you using ftp or sftp?

I’m saying, deleting things that where not part of the publish is bad practice. That could be data but also other needed frameworks.

ftp for now.

Please do not use FTP - it is an ancient protocol which is no longer considered safe. You should be using SFTP.

Thanks for your suggestion, i know that. But that is not my problem.