torchbox/wagtailmedia

Thumbnail and file accept any file type

jkevingutierrez opened this issue ยท 1 comments

Found a bug? Please fill out the sections below. ๐Ÿ‘

Issue Summary

When you are uploading a Video or Audio file, you are able to upload any kind of file. You could even upload a video as audio.

It would be good to limit the file type, to only accept video and audio files

Steps to Reproduce

  1. Start a new project with wagtail start myproject
  2. Integrate wagtailmedia
  3. Go to the media page (/admin/media/)
  4. Click on Add Audio or Add Video.
  5. Try to upload any non-media file (pdf, doc, etc)

image

Any other relevant information. For example, why do you consider this a bug and what did you expect to happen instead?

You shouldn't be able to upload non-media files or upload a video in the audio tab or vice versa.

Technical details

  • Python version: 3.8.5
  • Django version: 3.0.10
  • Wagtail version: 2.10.1
  • wagtailmedia: 0.6.0
  • Browser version: Chrome 85

Hey @jkevingutierrez, I've opened #140 to fix this.
Would be great if you could help test it.