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.
-
I have credentials from Aws secret id & key as well.
-
yes, I know how to install Active Storage , gem "aws-sdk-s3", gem "active storage validation.
-
I know to configure storage.yml & production.rb.
-
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