1
누구든지 React Native Formdata()를 통해 동영상을 업로드 했습니까? 아래의 코드는 카메라 롤 URI에서 .mov 파일을 업로드하려고 시도하지만 사실은 비디오의 첫 번째 프레임 (JPEG) 만 업로드됩니다. 여기에 무슨 문제가 있니?양식 네이버로 동영상 업로드하기
var movVideo = {
uri: uriFromCameraRoll,
type: 'video/quicktime',
name: 'something.mov',
};
var body = new FormData();
body.append('video', movVideo);
body.append('title', 'A beautiful video!');
fetch('https://mysite/upload_asset', {
method: "POST",
headers: {
'Accept': 'application/json',
'Content-Type': 'multipart/form-data'
},
body: body,
}).then((response) => response.json())
.then((responseJson) => {
//only the first frame of the video got uploaded
console.log(responseJson);
});
extrabacon = genius – Keng