diff --git a/rustfs/src/storage/options.rs b/rustfs/src/storage/options.rs index 5aafa96d..1886ffe3 100644 --- a/rustfs/src/storage/options.rs +++ b/rustfs/src/storage/options.rs @@ -18,6 +18,7 @@ use rustfs_ecstore::error::Result; use rustfs_ecstore::error::StorageError; use rustfs_utils::http::AMZ_META_UNENCRYPTED_CONTENT_LENGTH; use rustfs_utils::http::AMZ_META_UNENCRYPTED_CONTENT_MD5; +use rustfs_utils::http::RUSTFS_FORCE_DELETE; use s3s::header::X_AMZ_OBJECT_LOCK_MODE; use s3s::header::X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE; @@ -77,6 +78,11 @@ pub async fn del_opts( StorageError::InvalidArgument(bucket.to_owned(), object.to_owned(), err.to_string()) })?; + opts.delete_prefix = headers + .get(RUSTFS_FORCE_DELETE) + .map(|v| v.to_str().unwrap() == "true") + .unwrap_or_default(); + opts.version_id = { if is_dir_object(object) && vid.is_none() { Some(Uuid::nil().to_string())