Skip to content

Commit

Permalink
revert: content type (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloster authored Jan 23, 2025
1 parent f5c56ea commit be68737
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions ingestion_tools/scripts/common/fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,6 @@ def push(self, path: str) -> None:
print(f"Pushing {path} to {remote_file}")
self.s3fs.put(path, remote_file, recursive=True)

# Determine the Content-Type based on the file's extension
_, file_extension = os.path.splitext(remote_file)
content_type = "application/json" if file_extension == ".json" else "application/octet-stream"

# Set the Content-Type metadata
# https://s3fs.readthedocs.io/en/latest/api.html#s3fs.core.S3FileSystem.setxattr
self.s3fs.setxattr(remote_file, copy_kwargs={'ContentType': content_type})

def exists(self, path: str) -> bool:
return self.s3fs.exists(path)

Expand Down

0 comments on commit be68737

Please sign in to comment.