Make MAX_DISPLAY_FILE_SIZE configurable per filetype or renderer #10735

Open
opened 2025-11-02 09:16:59 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @matrss on GitHub (Apr 27, 2023).

Feature Description

External renderers might only render parts of a file, in which case another maximum file size than the global MAX_DISPLAY_FILE_SIZE could be desired.

As an example, I store some NetCDF files in a git(-annex) repository. I have added an external renderer for these .nc files that simply dumps the header of the file in html pre tags using ncdump -h. This is a cheap operation even for file sizes of multiple gigabytes. Therefore I would like this renderer to run for all NetCDF files, but keep the default 8MiB for anything else.

I am not sure if this should be an option on the external renderer or if there might be a use case for changing the maximum file size per filetype, so that it is possible to change the allowed size even for filetypes not handled by an external renderer or specify different maximum sizes for filetypes which are handled by the same renderer.

Screenshots

No response

Originally created by @matrss on GitHub (Apr 27, 2023). ### Feature Description External renderers might only render parts of a file, in which case another maximum file size than the global MAX_DISPLAY_FILE_SIZE could be desired. As an example, I store some NetCDF files in a git(-annex) repository. I have added an external renderer for these .nc files that simply dumps the header of the file in html pre tags using `ncdump -h`. This is a cheap operation even for file sizes of multiple gigabytes. Therefore I would like this renderer to run for all NetCDF files, but keep the default 8MiB for anything else. I am not sure if this should be an option on the external renderer or if there might be a use case for changing the maximum file size per filetype, so that it is possible to change the allowed size even for filetypes not handled by an external renderer or specify different maximum sizes for filetypes which are handled by the same renderer. ### Screenshots _No response_
GiteaMirror added the type/proposaltype/feature labels 2025-11-02 09:16:59 -06:00
Author
Owner

@StefanHamminga commented on GitHub (Mar 20, 2025):

Ran into this same issue where a 11MB KiCad PCB file would render as significantly smaller SVGs.

@StefanHamminga commented on GitHub (Mar 20, 2025): Ran into this same issue where a 11MB KiCad PCB file would render as significantly smaller SVGs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10735