Sign in or sign up before continuing. Don't have an account yet? Register now to get started.
Register now
Image upload
## Description currently there are many endpoints which handle picture uploading, resizing and cropping #### here is a list - `ImageHelper::resizeImg()` - `ImageHelper::createResizedPictures()` ## Goal unified REST-API Endpoint for uploading, resizing and croping, to be used for: * [x] profile pictures (https://gitlab.com/foodsharing-dev/foodsharing/-/merge_requests/1916) * [x] blog posts * [x] title pictures of working group * [x] title pictures of foodsharepoints (https://gitlab.com/foodsharing-dev/foodsharing/-/merge_requests/818) * [x] wall posts * [x] baskets ## Proposal - One endpoint for all file uploads - resizing/croping params for images - resized pictures are generated on first call and cached afterwards - log last access for cleaning purposes ### Endpoints - `POST /api/uploads` - `GET /api/uploads/:uuid/:filename` - `GET /api/uploads/:uuid/:filename?h=100&w=100&f=crop` ## Links / references - https://www.contentful.com/developers/docs/references/images-api/
epic