mirror of
https://github.com/RocketChat/Rocket.Chat.git
synced 2025-12-28 06:47:25 +00:00
fix: wrong file length after exif strip (#36676)
This commit is contained in:
parent
ab5bf99cd7
commit
61bca869b7
5
.changeset/tame-stingrays-hug.md
Normal file
5
.changeset/tame-stingrays-hug.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"@rocket.chat/meteor": patch
|
||||
---
|
||||
|
||||
Fixes an issue where files containing exif data would fail to upload to S3 when `Message_Attachments_Strip_Exif` is enabled.
|
||||
@ -211,6 +211,7 @@ API.v1.addRoute(
|
||||
if (stripExif) {
|
||||
// No need to check mime. Library will ignore any files without exif/xmp tags (like BMP, ico, PDF, etc)
|
||||
fileBuffer = await Media.stripExifFromBuffer(fileBuffer);
|
||||
details.size = fileBuffer.length;
|
||||
}
|
||||
|
||||
const fileStore = FileUpload.getStore('Uploads');
|
||||
@ -289,6 +290,7 @@ API.v1.addRoute(
|
||||
if (stripExif) {
|
||||
// No need to check mime. Library will ignore any files without exif/xmp tags (like BMP, ico, PDF, etc)
|
||||
fileBuffer = await Media.stripExifFromBuffer(fileBuffer);
|
||||
details.size = fileBuffer.length;
|
||||
}
|
||||
|
||||
const fileStore = FileUpload.getStore('Uploads');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user