Hi there,
i tried to upload some files to my dhis2 instances using report ressources but this last has limit size , so is there any way to change this setting.
thank you
Hi there,
i tried to upload some files to my dhis2 instances using report ressources but this last has limit size , so is there any way to change this setting.
thank you
Welcome back the community @ssari!
Whatâs the limited size that you are being faced with?
The File Resources api endpoint can be used to store large files:
âThe contents of file resources are not directly accessible but are referenced from other objects (such as data values) to store binary content of virtually unlimited size.â (source)
Please feel free to share more details about the use case (what and why you are trying to achieve using these uploads.) As sharing the use case helps with the community discussion and encourages creation of feature requests.
Thanks!
Hi @ssari,
I would appreciate it if you could please elaborate on the issue.
I would like to know the following points:
Thanks
Hi,
so here what im getting when i upload my file
ps: its size is about 33Mb and i noticed just small size files can be uplaoded
@ayman.tuffaha yes the application is deployed proprely and i didnât make any change in the environment
thank you
Thanks @ssari,
What version number of DHiS2 you are using? could you please translate the error in red into English?
BR,
Ayman
@ayman.tuffaha
Im using DHIS 2.37.2
the message error is : âAn error occurred while adding the resource!â
This is typically controlled by nginx (or whichever reverse proxy you have deployed). The directive to set for nginx is:
client_max_body_size 100M;
You can obviously set the directive to whatever max limit you prefer, and set it either on the server or location block in nginx.
You might even want to create more specific location blocks for the /api/fileResources
API endpoint to ensure large files cannot be sent or uploaded elsewhere.
There are multiple guides online regarding this topic. Nginx docs here:
http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size
best,
Lars
Thank you @Lars it solved my issue