mardi 15 septembre 2020

Using ActiveStorage with Aws in Rails Api

I'm learning rails and I have a task to make an API in rails that can take image params from the front-end and save it to the backend in the image model with its caption.

  1. I have credentials from Aws secret id & key as well.

  2. yes, I know how to install Active Storage , gem "aws-sdk-s3", gem "active storage validation.

  3. I know to configure storage.yml & production.rb.

  4. I'll add a line has_one_attached :image in my Restaurant Model.

But i don't know what kind of params I'll get from the front-end developer & how can I test that params or URL in my postman from my side . & how to return that image in json format to the frontend developer after saving it.

i want to upload restaurant images from users.

Aucun commentaire:

Enregistrer un commentaire