Copy file from project on xojocloud

We are creating a web app that will require a file to run. It must be located in a folder separate from the application data so I was thinking of adding this file to the project and then copy it to the folder where the application will always look for it.

How would I get a reference to the file in the project to copy it to the necessary folder.

I know I could use a post build step when deploying to xojocloud but I’d like to build this routine into the application.

Place it in Resources and access it in the app using
SpecialFolder.Resources.Child(…)

1 Like

I know where to store the files, my question is how to get the files there?

Hello @John_Fatte,

Quoting the docs:

Xojo cloud

For Xojo Cloud, these are the only SpecialFolder methods that are usable. All others return Nil:

  • Fonts

  • SharedDocuments: The web server Shared_Documents folder.

  • Documents: The Documents folder within the web app folder.

  • Temporary: The web server tmp folder.

Based on the docs, you would likely place your file/s within the Documents folder, particularly if you wish to access the files from within your app (without the files being either publicly available or temporary).

If you enable SFTP and SSH Tunnel in your Xojo Cloud Control Panel (by logging into your Xojo account and selecting Cloud), you can use an FTP client to navigate your apps Xojo Cloud.

I personally use a product called CloudMounter that loads my Xojo Cloud account like a network folder in the Finder on Mac or Windows Explorer.

However, we also build a kinda “management app” within our web apps that allows admin users to manage the content within the Special Folders (to some limited extent) of each app.

I hope that helps.

Kind regards, Andrew

1 Like

Andrew

Thank you for the very informative reply. We kind of build in some management tools as well and I was going to just do that, but I’m going to check into CloudMounter. That sounds interesting.

Definitely the information I was looking for. Have a great day.

1 Like