Comments (9)
eh, spoke to soon man, it appears that it is uploading the file, but it wont play for some reason. Im uploading 2-3 second clips to test and the file size is 1.8MB or around there, but the video is 0 seconds. corrupt somehow. Im trying to work through it to see if something is fishy on my end...
Ill post some code for you in a moment.
from react-native-aws3.
Although I feel like this should work, I have never tested video uploads. The only uploads I've tested myself are images. Perhaps someone else has experience with uploading files that are something other than jpg/png images?
from react-native-aws3.
from react-native-aws3.
Cool, I'm going to close this then.
from react-native-aws3.
So here is the sample code I have for the upload for iOS....Ill have to change the filetype for android but just trying iOS for now...
uploadVideo() {
const file = {
uri: this.props.video.path,
name: 'react-test-1.mov',
type: 'video/quicktime'
};
let prefixPlatform = 'droid_';
if (Platform.OS === 'ios') {
prefixPlatform = 'ios_';
}
const options = {
keyPrefix: prefixPlatform,
bucket: 'uploads',
region: 'us-east-1',
accessKey: '<my_key>',
secretKey: '<my_secret>',
successActionStatus: 201
};
RNS3.put(file, options)
.then(response => {
if (response.status !== 201) {
console.log('error uploading to S3');
} else {
console.log(response.body);
}
})
.progress((e) => {
console.log(e.loaded / e.total);
this.updateProgress((e.loaded / e.total));
}
)
.catch((err) => {
console.log(err);
});
}
The progress updates in the console, and all looks well, but I get some sort of corruption in the video.
from react-native-aws3.
I have the same issue. Did you ever figure out a fix?
from react-native-aws3.
from react-native-aws3.
How is this issue closed?
Can we re-open this?
from react-native-aws3.
In the type pass video/mov
and not video/quicktime
.
from react-native-aws3.
Related Issues (20)
- Mulitple upload HOT 2
- I have only identityPoolId. So, what should I do? is this library support?
- File Upload Dont work in Android HOT 3
- A server with the specified hostname could not be found. HOT 2
- How use Amazon S3 Transfer Acceleration
- postResponse null issue HOT 1
- How to upload multiple files? `Solution`
- Write error: ssl=0x752c77f708: I/O error during system call, Broken pipe
- {"headers": {}, "status": 0, "text": "Stream Closed"} HOT 13
- How to access(get uploaded file) the private bucket in aws s3 repo ?
- Unable to upload video when bucket name contains dots eg. domain names
- FormData and XMLHttpRequest are not defined
- Google play - Leaked AWS credentials HOT 1
- Failed to upload image to S3
- Abort upload HOT 2
- Stream Closed HOT 10
- Error :- read failed: EBADF (Bad file descriptor) when upload image. HOT 2
- Check s3 folder size through RNS3
- Is this going to be affected by AWS’s Move to Its Own Certificate Authority?
- In Android its not working HOT 1
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 react-native-aws3.