fix(payload): calculates correct aspect ratio dimensions on sharp based files (#8537)
v2 PR [here](https://github.com/payloadcms/payload/pull/8510)
This commit is contained in:
@@ -141,6 +141,18 @@ describe('uploads', () => {
|
||||
await saveDocAndAssert(page)
|
||||
})
|
||||
|
||||
test('should properly create IOS file upload', async () => {
|
||||
await page.goto(mediaURL.create)
|
||||
|
||||
await page.setInputFiles('input[type="file"]', path.resolve(dirname, './ios-image.jpeg'))
|
||||
|
||||
const filename = page.locator('.file-field__filename')
|
||||
|
||||
await expect(filename).toHaveValue('ios-image.jpeg')
|
||||
|
||||
await saveDocAndAssert(page)
|
||||
})
|
||||
|
||||
test('should create animated file upload', async () => {
|
||||
await page.goto(animatedTypeMediaURL.create)
|
||||
|
||||
|
||||
BIN
test/uploads/ios-image.jpeg
Normal file
BIN
test/uploads/ios-image.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
Reference in New Issue
Block a user