Skip to content

Commit

Permalink
Fix svg file sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
AnderbergE authored and LinusU committed Oct 14, 2021
1 parent 70fddd2 commit 7f0abdc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.svg text eol=lf
4 changes: 2 additions & 2 deletions test/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ describe('Multer S3', function () {
assert.equal(req.file.fieldname, 'image')
assert.equal(req.file.contentType, 'image/svg+xml')
assert.equal(req.file.originalname, 'test.svg')
assert.equal(req.file.size, 102)
assert.equal(req.file.size, 100)
assert.equal(req.file.bucket, 'test')
assert.equal(req.file.etag, 'mock-etag')
assert.equal(req.file.location, 'mock-location')
Expand Down Expand Up @@ -221,7 +221,7 @@ describe('Multer S3', function () {
assert.equal(req.file.fieldname, 'image')
assert.equal(req.file.contentType, 'image/svg+xml')
assert.equal(req.file.originalname, 'test2.svg')
assert.equal(req.file.size, 292)
assert.equal(req.file.size, 285)
assert.equal(req.file.bucket, 'test')
assert.equal(req.file.etag, 'mock-etag')
assert.equal(req.file.location, 'mock-location')
Expand Down
2 changes: 1 addition & 1 deletion test/files/test2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7f0abdc

Please sign in to comment.