Merge branch 'main' into list-objects

This commit is contained in:
weisd
2024-12-28 22:31:46 +08:00
committed by GitHub
5 changed files with 93 additions and 13 deletions
+2
View File
@@ -391,6 +391,8 @@ impl S3 for FS {
.await
.map_err(to_s3_error)?;
warn!("head_object info {:?}", &info);
let content_type = {
if let Some(content_type) = info.content_type {
match ContentType::from_str(&content_type) {
+10
View File
@@ -62,9 +62,19 @@ pub fn to_s3_error(err: Error) -> S3Error {
s3_error!(SlowDown, "Storage resources are insufficient for the write operation")
}
StorageError::DecommissionNotStarted => s3_error!(InvalidArgument, "Decommission Not Started"),
StorageError::VolumeNotFound(bucket) => {
s3_error!(NoSuchBucket, "bucket not found {}", bucket)
}
StorageError::InvalidPart(bucket, object, version_id) => {
s3_error!(
InvalidPart,
"Specified part could not be found. PartNumber {}, Expected {}, got {}",
bucket,
object,
version_id
)
}
};
}