Fix Drive video upload to Shopify
- Detect video mime types in MediaService to set correct resource ('VIDEO') and mediaContentType.
- Add fileSize to stagedUploadsCreate payload as required by Shopify for videos.
- Add safety check for missing upload targets to prevent crashes.
- Implement getSize in MockDriveService.
- Add unit test in MediaService.test.ts to verify correct resource and fileSize handling for video uploads.
- Update mock in mediaManager.integration.test.ts to support getSize().
This commit is contained in:
@ -72,6 +72,7 @@ describe("MediaService V2 Integration Logic", () => {
|
||||
moveTo: jest.fn(),
|
||||
getMimeType: () => "image/jpeg",
|
||||
getBlob: () => ({}),
|
||||
getSize: () => 1024,
|
||||
getId: () => id
|
||||
}))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user