나는이 매우 멋진 업 로더 (NPM - 5.12.0-alpha의 최신 버전)를 설치하여 일부 데이터를 S3로 보내려고했는데 청킹과 관련하여 몇 가지 문제가있었습니다. 나는 chunking을 활성화했다. 예를 들어 Concurrent Chunking에서 예제를 기반으로하지만 XHR 콘솔에 업로드되는 여러 개의 청크는 보지 못했다.파인 업 로더 Concurrent Chunking S3
const fu = require('fine-uploader/lib/s3');
const SA = require('superagent');
let x = new fu.s3.FineUploaderBasic({
request: {
endpoint: 'they-taken-mah-bucket.s3.amazonaws.com'
},
credentials: {
accessKey: 'invalid',
expiration: new Date(),
secretKey: 'invalid',
sessionToken: 'invalid'
},
objectProperties: {
bucket: 'they-taken-my-bucket',
key: 'filename'
},
autoUpload: false,
debug: true,
callbacks: {
onComplete: function(){
moveUpload({from:'active', to:'finished', hash: activeUpload.hash}).then(function() { good(hash); });
},
onError: function(id, name, reason, xhrCache){
moveUpload({from:'active', to:'error', hash: activeUpload.hash}).then(() => bad(new Error('upload error - '+reason)));
},
onProgress: function(id, name, uploaded, total){
const elapsed = (Date.now() - t.getTime())/1000;
const rate = uploaded/elapsed;
updateUploadProgress({hash: activeUpload.hash, progress: (100*uploaded/total).toFixed(0), rate: rate});
},
chunking: {
enabled: true,
concurrent: {
enabled: true
}
},
maxConnections: 5,
retry: {
enableAuto: true,
maxAutoAttempts: 10
},
onCredentialsExpired: function() {
return fetchCredentials();
}
}
});`
동작 제가 보는 : http://recordit.co/z5VnLR63eT
는 기본적으로 나는 OPTIONS 요청을보고, 그 잘 가고, 업로드가 제대로 시작하지만 난 단지 1 개 아웃 바운드 연결을 참조 - 콘텐츠 유형이없는 것입니다 나는 그것이 원시가 아닌 멀티 파트 형식이라는 것을 기대한다. 비록 내가이 기대에서 틀렸을 지 모르겠지만, 나는 단지 빈 빈 게시판 일 것으로 기대했을 것이다.
모든 조언을 주시면 감사하겠습니다.
파일의 크기는 어느 정도입니까? 그리고 한 파일 만 제출합니까? –
아, 죄송합니다. 스크린 샷을 첨부 한 것 같습니다. 예, 단지 1 파일이며 54MB입니다. 나는 ~ 5MB의 기본 부품 크기 (S3 문서에 의하면)를 10 청크로 나누고 동시에 3 (maxConnections)을 업로드 할 것으로 기대한다. –