Description:
bind S3 construct to API construct in SST so that the API has the S3 id after building (randomly generated at every build)
Checkpoints:
[x] Able to build an S3 construct in the backend.ts which is in the stacks folder
an idea is that after building the s3 construct, it will give us back a bucket that we can use in our .env (make a new env variable called BUCKET), similarly to API_URL. We then pass this new env variable into the frontend.ts which is is also in the stacks folder to "connect" with the frontend
[x] Able to upload images and retrieve back an image url to use on frontend
[x] Convert above ^ working logic into our actual ZotNFound flow
Where user can upload an image and it should render that image photo on the screen in the CreateModal
[x] Fix CORB error (makes some images not show initially)
Description: bind S3 construct to API construct in SST so that the API has the S3 id after building (randomly generated at every build)
Checkpoints:
backend.ts
which is in thestacks
folder.env
(make a new env variable calledBUCKET
), similarly toAPI_URL
. We then pass this new env variable into thefrontend.ts
which is is also in thestacks
folder to "connect" with the frontendCreateModal
Resources:
Note that this example uses NextjsSite, and we are using StaticSite, which is what prompted the idea above for checkpoint 1