diff --git a/pillar/api/file_storage/moving.py b/pillar/api/file_storage/moving.py index ce611c0e..5a72f368 100644 --- a/pillar/api/file_storage/moving.py +++ b/pillar/api/file_storage/moving.py @@ -126,7 +126,7 @@ def fetch_file_from_link(link): file_dict = { 'file_size': os.fstat(local_file.fileno()).st_size, - 'content_type': r.headers['content-type'], + 'content_type': r.headers.get('content-type', 'application/octet-stream'), 'local_file': local_file } return file_dict