mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 15:49:42 +02:00
feat: Timeline Image Uploader Improvements (#2494)
* improved UI responsiveness and added image preview * added global image cropper component * added image cropper to last made dialog * style tweaks * added more specific text for creating event * mopped up some slop * renamed height and width vars --------- Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
This commit is contained in:
parent
e24e28ae03
commit
2151451634
9 changed files with 246 additions and 8 deletions
|
@ -196,10 +196,10 @@ export class RecipeAPI extends BaseCRUDAPI<CreateRecipe, Recipe, Recipe> {
|
|||
);
|
||||
}
|
||||
|
||||
async updateTimelineEventImage(eventId: string, fileObject: File) {
|
||||
async updateTimelineEventImage(eventId: string, fileObject: Blob | File, fileName: string) {
|
||||
const formData = new FormData();
|
||||
formData.append("image", fileObject);
|
||||
formData.append("extension", fileObject.name.split(".").pop() ?? "");
|
||||
formData.append("extension", fileName.split(".").pop() ?? "");
|
||||
|
||||
return await this.requests.put<UpdateImageResponse, FormData>(routes.recipesTimelineEventIdImage(eventId), formData);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue