Use streams to download attachments directly to disk
Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
This commit is contained in:
parent
2da49456c6
commit
99b2bc304e
48 changed files with 2297 additions and 356 deletions
|
@ -35,7 +35,12 @@ describe('scaleImageToLevel', () => {
|
|||
testCases.map(
|
||||
async ({ path, contentType, expectedWidth, expectedHeight }) => {
|
||||
const blob = await getBlob(path);
|
||||
const scaled = await scaleImageToLevel(blob, contentType, true);
|
||||
const scaled = await scaleImageToLevel(
|
||||
blob,
|
||||
contentType,
|
||||
blob.size,
|
||||
true
|
||||
);
|
||||
|
||||
const data = await loadImage(scaled.blob, { orientation: true });
|
||||
const { originalWidth: width, originalHeight: height } = data;
|
||||
|
@ -56,7 +61,7 @@ describe('scaleImageToLevel', () => {
|
|||
'Test setup failure: expected fixture to have EXIF data'
|
||||
);
|
||||
|
||||
const scaled = await scaleImageToLevel(original, IMAGE_JPEG, true);
|
||||
const scaled = await scaleImageToLevel(original, IMAGE_JPEG, original.size);
|
||||
assert.isUndefined(
|
||||
(await loadImage(scaled.blob, { meta: true, orientation: true })).exif
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue