Best practice for uploading images from Android to Cloud Hosting (DigitalOcean or Hostinger)

Viewed 34

I'm trying to find a way on how to upload images to digitalOcean Spaces from my kotlin android application. Here is what I want to do:

  1. Let the user Upload images to a Cloud Storage.
  2. Create an Node.js GraphQL API to store the name, username, image-url etc on a MySQL Database.

Number 2 is finished and working fine, the only thing that I couldn't figure out so far is how to upload the images to a cloud storage. I currently use DigitalOcean for hosting my Node.js GraphQL Api and my MySQL Database so I would like to also use DigitalOceans Spaces to store the image files.

How should I develop the API for file uploads? In Node.js or in PHP? I already have the GraphQL API to store the imageURL in the database but I heard that GraphQL is not so good for uploading images. I also need an authentication system with access tokens so the user can only access the images from his account.

Would be really glad to get some hints on what to look into, not expecting a fully detailed explanation. Just looking for a good and up-to-date practice, how would you guys do it?

P.s I'm talking about images that are 8 - 100 kb big

0 Answers
Related