Export Library and Course error with MINIO (S3) integrated

As far as I am concerned, this PR fixes both this issue and this other one.