Hi,
Though i’m still new to orthanc.
I have Orthanc running remotely behind nginx and i also installed orthanc it locally on my macbook. Uploading of a .dcm file works perfectly remotely and locally. But without any special configuration, when i upload a .zip file locally, it works well. When i upload the same .zip file remotely, i get an error like this.
{
"Details" : "Cannot parse an invalid DICOM file (size: 22246772 bytes)",
"HttpError" : "Bad Request",
"HttpStatus" : 400,
"Message" : "Bad file format",
"Method" : "POST",
"OrthancError" : "Bad file format",
"OrthancStatus" : 15,
"Uri" : "/instances"
}
```.
Pls i need help with this.
Hello,
Your question is presumably related to nginx, not to Orthanc. Indeed, by default, nginx limits the POST body size to 1MB.
Check out the client_max_body_size
configuration option of nginx, for instance: Default nginx client_max_body_size - Stack Overflow
Regards,
Sébastien-
Hello Sébastien,
Thanks for the response.
Though I had already increased the the post body size in the nginx.conf file by setting client_max_body_size 250M
; the
This is what my nginx.conf file currently looks like
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
client_max_body_size 250M;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
Hello,
Unfortunately, we cannot provide any additional information unless you provide us with a full minimal working example to reproduce your issue. You are presumably using a custom Web application between nginx and Orthanc, as your configuration file doesn’t follow our instructions for nginx (i.e. no proxy_pass
is present in your nginx configuration).
Regards,
Sébastien-
1 Like
Ok. Thank you.
I will look at the nginx configuration for orthanc.