Rebuild-Black-Business / RBB-Website

Website to help connect black-owned businesses with consumers and resources
https://www.rebuildblackbusiness.com/
MIT License
119 stars 72 forks source link

[Spike] Figure out image storage for Business images / logos #291

Open magnificode opened 4 years ago

magnificode commented 4 years ago

Spike

Need to explore Cloudinary / Airtable storage limits and how we pass images to cloudinary before storing them in Airtable.

magnificode commented 4 years ago

@llexical similar to #290, this task may require a custom API hook into Airtable to allow us to build custom forms in favor of the Airtable iframe embeds. We could very easily use Cloudinary API hooks (with the help of @domitriusclark) to ingest an uploaded image, and return the Cloudinary Asset ID for storage in Airtable.

llexical commented 4 years ago

Yeh I think we will have to use the Airtable API to hook in for this to work, we can make a lot of other stuff work, however image uploads we are not going to be able to do in anyway easily without hooking into the API ourselves so we can do the upload and then pass the identifier into Airtable.

magnificode commented 4 years ago

@llexical once #297 is merged in, we should have full access to the Airtable API and the ability to customize the form fields however we see fit.

What I'm thinking here, is that we can create an upload input field, that onChange will call out to the Cloudinary API (with the help of @domitriusclark ), upload that image to Cloudinary, and then return the Cloudinary asset ID as a value, either in a hidden input field, or as the value on the upload input field itself. Once we have that asset ID returned to the FE, we can then upload just that data, and not the image itself, to cloudinary.

Does that make sense logistically? @domitriusclark do we have any concerns about letting businesses upload their own images to Cloudinary?