Comments (5)
My workaround for now is to read the whole file into memory and use put_object_blocking
. Not ideal but I'm not working with big files.
// Open the file
let mut file = File::open(path).expect("Unable to open file!");
let mut buffer = Vec::new();
// read the whole file
file
.read_to_end(&mut buffer)
.expect("Unable to read to end");
// Upload file to AWS
let (_, status_code) = bucket
.put_object_blocking(&server_filename, &buffer, "application/octet-stream")
.unwrap_or_else(|e| {
error!("Unable to upload {}! Error: {}", &server_filename, e);
std::process::exit(1);
});
from rust-s3.
@jaredwolff thank you for raising the issue, I'll look into it ASAP
from rust-s3.
I came into the same issue too.
The put_object_stream_blocking just uploaded an empty file, discarding the content.
from rust-s3.
@jaredwolff, @jiangplus version 0.23
released today fixes this
from rust-s3.
This is very likely not the same issue but I had a problem with the same result. Problem was I needed to reset the pointer for the file with file.seek(SeekFrom::Start(0)).await?;
before uploading.
from rust-s3.
Related Issues (20)
- Document credential refreshing behaviour
- socks5 integration HOT 3
- Compiling with "tokio-rustls-tls" and default-features = false still depends on native-tls HOT 1
- Checking for object existence HOT 3
- bucket.complete_multipart_upload unexpected log message HOT 1
- put_multipart_chunk should NOT consume the chunk parameter HOT 1
- Can I set the contentencoding of an object when I upload it? HOT 1
- "PROTOCOL_ERROR" when using GCS as S3 backend, tokio-rustls-tls HOT 1
- Feature request: No verify SSL should be a parameter rather than a feature HOT 3
- Update list of available Wasabi Regions
- delete_object method return 403 SignatureDoesNotMatch Error. HOT 1
- RUSTSEC-2024-0336: DoS in rustls: Infinite loop based on network input HOT 1
- `rust-s3` returns `Ok` result when garage responds with error HOT 1
- Add ability to specify custom http client HOT 1
- Progress reports for put_object_streams HOT 2
- Project maintenance status? HOT 1
- Add Bucket Lifecycle support
- Some feature combinations no longer compile HOT 5
- Feature tokio-rustls-tls requires native-tls? HOT 8
- Add support for proxy HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-s3.