MediaArchiveSize seems not working

Hi All,

This was left at the default of “1” but the zip is kept on adding to the “temp” folder every time I use curl to download an archive. I thought MediaArchiveSize should limit the number of zip files in the temp folder to just 1. My apologies if my understanding was wrong.

Thanks,
cuong

Hello,

What version of Orthanc are you using?

Starting with Orthanc 1.9.4, ZIP archives are by default generated in synchronous mode, which means that by default, no temporary file is created, and “MediaArchiveSize” is not used.

If you don’t use Orthanc Explorer, but instead call the REST API of Orthanc from your application, make sure to use the synchronous version of the “…/media” and “…/archive” to avoid the creation of any ZIP file.

Sébastien-

Hello Sébastien,

Thanks for replying!

I’m using 1.5.8. Isn’t the Synchronous mode the default behavior when using the REST API?

-cuong

No, it isn’t. Check out the related comments in the configuration file:
https://hg.orthanc-server.com/orthanc/file/Orthanc-1.10.1/OrthancServer/Resources/Configuration.json#l847

I ran this and the ZIP file still got added to the tmp folder. I also tried with the SynchronousZipStream option set to true.

curl -X POST http://localhost:8042/studies/uri_string/archive -d ‘{“Synchronous”: true}’ > test.zip

As written in the “Configuration.json” (cf. my previous message), synchronous ZIP require Orthanc 1.9.4.

=> Upgrade Orthanc