How to Completely Disable File Uploads in JupyterLab

Hello Jupyter Community,

I’m currently looking for a way to entirely disable the file upload functionality in JupyterLab. I have tried the common approach of setting "uploader": { "disabled": true } in .jupyter/user-settings/@jupyterlab/filebrowser-extension/plugin.jupyterlab-settings, but it hasn’t achieved the desired effect.

Additionally, I attempted to set c.NotebookApp.allow_upload = False in jupyter_notebook_config.py, yet the upload button remains accessible in the file browser.

Is there a more comprehensive way to fully disable the file upload capability in JupyterLab? Any advice or alternative solutions would be greatly appreciated, especially if they’ve worked well in similar scenarios. My goal is to restrict all users from uploading files through the interface.

Thank you in advance for your help!

Best regards,
DUJARDIN Romain

I was able to do this, but I think your path for adjusting the user preferences settings file is different than mine, it was in this path:

/home/jupyter/.jupyter/lab/user-settings/@jupyterlab/filebrowser-extension/widget.jupyterlab-settings

In that file, I updated it as such:

{
    // File Browser Widget
    // @jupyterlab/filebrowser-extension:widget
    // File Browser widget settings.
    // ****************************************
    "toolbar": [
        {
            "name": "uploader",
            "disabled": true
        }
    ]
}

After adjusting it, I did see the upload button in the toolbar get removed. You can also try this via the JupyterLab UI, see the image below, the upload button in the toolbar is disabled.

I could be on a different version of JupyterLab, but hope this helps.

2 Likes

Hello

Thank you very much for your reply!! and indeed it works and I already had the solution for the upload button, on the other hand I want to disable the drag and drop file to jupyter because this option is also available and I need to disable it!

if you have any ideas I’d love to hear them, I’m still waiting for a solution!

Romain