Skip to content

Commit

Permalink
feat: add more queries to storage server route
Browse files Browse the repository at this point in the history
  • Loading branch information
EvgenyWas committed Jun 2, 2024
1 parent 6aeccd2 commit 53e1e5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/routes/storage/[...].ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ export default defineEventHandler((event) => {
const path = pathname.replace('/storage/', '');
assetUrl = cloudinary.url(path, {
quality: 'auto',
fetch_format: 'auto',
fetch_format: 'webp',
width: searchParams.get('width'),
height: searchParams.get('height'),
gravity: searchParams.get('gravity'),
crop: searchParams.get('crop'),
aspect_ratio: searchParams.get('aspect_ratio'),
});
} catch (error) {
return sendError(event, createError({ statusCode: 500, statusMessage: 'Internal Server Error', unhandled: false }));
Expand Down

0 comments on commit 53e1e5a

Please sign in to comment.