screenshot-to-code icon indicating copy to clipboard operation
screenshot-to-code copied to clipboard

Support .mov for video upload

Open mayinrain opened this issue 1 year ago • 1 comments

Describe the bug When I upload a video with a .mov extension, the file is recognized as an image format. To Reproduce Steps to reproduce the behavior:

  1. Go to http://localhost:5173/
  2. Click on file uploader
  3. Select a file with a .mov extension
  4. The file is recognized as an img.

Screenshots of backend AND frontend terminal logs I printed the Base64 of the file and found that the prefix is data:application/octet-stream, so it is recognized as an img.

image

Here is the corresponding code

mayinrain avatar Aug 06 '24 11:08 mayinrain

Yeah, I would recommend converting .mov to .mp4 before uploading it.

We probably will support more video formats, but there's lots of different ones so that isn't the biggest focus at the moment.

abi avatar Aug 06 '24 14:08 abi