mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-13 16:46:55 +00:00
update filereader/writer todo
This commit is contained in:
@@ -3,7 +3,7 @@ use super::router::Operation;
|
||||
use super::router::S3Router;
|
||||
use crate::storage::ecfs::bytes_stream;
|
||||
use ecstore::disk::DiskAPI;
|
||||
use ecstore::io::READ_BUFFER_SIZE;
|
||||
use ecstore::set_disk::DEFAULT_READ_BUFFER_SIZE;
|
||||
use ecstore::store::find_local_disk;
|
||||
use futures::TryStreamExt;
|
||||
use http::StatusCode;
|
||||
@@ -72,7 +72,7 @@ impl Operation for ReadFile {
|
||||
Ok(S3Response::new((
|
||||
StatusCode::OK,
|
||||
Body::from(StreamingBlob::wrap(bytes_stream(
|
||||
ReaderStream::with_capacity(file, READ_BUFFER_SIZE),
|
||||
ReaderStream::with_capacity(file, DEFAULT_READ_BUFFER_SIZE),
|
||||
query.length,
|
||||
))),
|
||||
)))
|
||||
|
||||
@@ -30,8 +30,8 @@ use ecstore::bucket::tagging::decode_tags;
|
||||
use ecstore::bucket::tagging::encode_tags;
|
||||
use ecstore::bucket::versioning_sys::BucketVersioningSys;
|
||||
use ecstore::error::StorageError;
|
||||
use ecstore::io::READ_BUFFER_SIZE;
|
||||
use ecstore::new_object_layer_fn;
|
||||
use ecstore::set_disk::DEFAULT_READ_BUFFER_SIZE;
|
||||
use ecstore::store_api::BucketOptions;
|
||||
use ecstore::store_api::CompletePart;
|
||||
use ecstore::store_api::DeleteBucketOptions;
|
||||
@@ -575,7 +575,7 @@ impl S3 for FS {
|
||||
let last_modified = info.mod_time.map(Timestamp::from);
|
||||
|
||||
let body = Some(StreamingBlob::wrap(bytes_stream(
|
||||
ReaderStream::with_capacity(reader.stream, READ_BUFFER_SIZE),
|
||||
ReaderStream::with_capacity(reader.stream, DEFAULT_READ_BUFFER_SIZE),
|
||||
info.size,
|
||||
)));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user