Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: disable one of video or audio by setting. #248

Open
mscout1 opened this issue Oct 21, 2024 · 1 comment
Open

Feature Request: disable one of video or audio by setting. #248

mscout1 opened this issue Oct 21, 2024 · 1 comment

Comments

@mscout1
Copy link

mscout1 commented Oct 21, 2024

We only want to use this for AUDIO for now. For video, we are using a youtube embed widget.

We only setup the our StreamFields with AudioChooserBlock, and that's fine. It will protect us from some writer costing us video bandwidth.

We would also like to protect our storage by preventing video upload. At first I thought that setting VIDEO_EXTENSIONS to an empty list would prevent any files from being uploaded, since no extensions were whitelisted. Instead, it allowed all extensions.

Ideally, we would also like to hide the "add video" button to fully prevent confusion.

I would suggest that an empty list in *_EXTENSIONS setting should hide the button and disallow all uploads. None can still allow all if that is desired.

For now, out work around is to set VIDEO_EXTENSIONS to ["video_upload_disabled"]. That still allows a tricky bad guy to upload a file, but at least it prevents accidents.

@blu14x
Copy link

blu14x commented Dec 19, 2024

Same situation for me.
To remove the "add video" button i extended the template like this:

<app>/templates/wagtailmedia/media/index.html

{% extends "wagtailmedia/media/index.html" %}
{% load i18n wagtailadmin_tags %}

{% block add_actions %}
    <a href="{% url 'wagtailmedia:add' 'audio' %}" class="button button--icon bicolor">{% icon name="plus" wrapped=1 %}{% trans "Add audio" %}</a>
{% endblock %}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants