Download limit only applies to directories?

Hi, I’m currently configuring a new OOD server and looking at restricting downloads to small files (a few MB), basically so the viewer works but can’t seem to get the limit to apply to files.

The upload limit works for both files and directories and the docs suggest that OOD_DOWNLOAD_DIR_MAX applies to files (despite the name)

By default, the maximum file download size is 10.7 GB (10737418240 bytes). If you wish to change this, you can set the OOD_DOWNLOAD_DIR_MAX configuration environment variable in the /etc/ood/config/apps/dashboard/env file to the desired value in bytes

I have the following in /etc/ood/config/apps/dashboard/env (set extremely small, 10 bytes, while testing)

# Set download limits
OOD_DOWNLOAD_DIR_MAX=10

This works for directories and I get this as expected when trying to download anything

The directory is too large to download as a zip. The directory should be less than 10 bytes.

But still allows any file downloads, regardless of how large it is (tested with a 16GB file)

It looks like even if I remove those setting the default max file download size still doesn’t apply to individual files and the 16GB files starts downloading. Is this expected is it only directories (as the variable name suggest) that are effected by this limit?

Sorry for the confusion with the names.

Currently OOD does not have a way to limit the downloads of files themselves. The uploads have the limits because the library used can run a simple check, but this is not as straightforward to do in the downloads.

We’ve had people request this in the past and there’s an issue on the main repo discussing some of this here: Download and upload limit doesn't work on files app · Issue #2927 · OSC/ondemand · GitHub

Hi Travis, thank you for the clarification and pointing to the GitHub issue (sorry didn’t stumble on this when I was searching), that makes sense. I’ll keep an eye on GitHub.

Thank you and the team for all the work on OOD.