-
Notifications
You must be signed in to change notification settings - Fork 22
Add GIF support #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging
Are you sure you want to change the base?
Add GIF support #149
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -213,10 +213,12 @@ export const actions = { | |
| // Remove Exif metadata and save (we don't want another Hack Club classic PII leak :D) | ||
| const imageBuffer = Buffer.from(await imageFile.arrayBuffer()); | ||
|
|
||
| const imageBody = imageFile.type === 'image/gif' ? imageBuffer : await sharp(imageBuffer).toBuffer(); | ||
|
|
||
| const imageCommand = new PutObjectCommand({ | ||
| Bucket: env.S3_BUCKET_NAME, | ||
| Key: imagePath, | ||
| Body: await sharp(imageBuffer).toBuffer() | ||
| Body: imageBody | ||
|
||
| }); | ||
| await S3.send(imageCommand); | ||
|
|
||
|
|
||
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.