cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BTP, Node.js and how to upload and store files

jensniemeyer
Participant
0 Kudos

Ho,

I have written a Nodejs.App which could be reached with REST.

The app could retrieve binary data (such as images) and stores them in the SAP HANA DB.

Now I want to store the binary-files directly directories of the BTP webserver.

Any Idea, how I could adchive this?

Kind regards

Jens

Accepted Solutions (0)

Answers (1)

Answers (1)

martinstenzig
Contributor

You should be able to write the files to the file system of the app (node js service), but once you scale it, you have the stored file on one node and not on the other. For temporary storage it might be ok, but I would not use that approach for real persistency. So I would probably store them in separate file service... BTP Object Store, S3 bucket, Dropbox...

remi_astier
Advisor
Advisor

A separate file service is best because your service remains stateless as opposed to stateful. There is a wise saying that goes like this: "stateful is painful" 😄

BTP Object store is backed by S3 or Azure blob storage at the same cost but staying inside BTP makes security and vendor support much easier. In Q1 2023, you will also be able to use the service redis in BTP.

I felt adventurous and deployed my own elastic storage solution inside Kyma with min.io but it is not suitable for productive use.