Accessing files on other service

Hello, I’ve got 2 services, main API and microservice which generates files.

Instead of returning file from microservice (they can be big and our transport protocol handle only 1mb messages) we are storing file locally and just simply return link to our API which downloads it.

Now we have problem with app platform because we can’t get this file from another service.

We would not like to use spaces, because it takes precious miliseconds for uploading the file.

Is there a way we can access filed on microservice from our API?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
August 7, 2022

Hi there,

Storing files on the local file system of your App platform components is not really recommended, because the app instances are ephemeral, and are being continuously created and destroyed as the app is scaled, redeployed, etc, and any changes to the filesystem will be destroyed with the instance. This means that every redeployment of your app will reset the filesystem.

If this is alright for your use case, what you could do is to store your files in a publicly accessible directory (eg. a directory exposed to the ${PUBLIC_URL}), so that you could download them via HTTP requests.



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up