mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
catch error in onComplete for fineuploader
This commit is contained in:
parent
c33976ad37
commit
a4a0e9d149
@ -20,7 +20,6 @@ import AppConstants from '../../constants/application_constants';
|
||||
import { computeHashOfFile } from '../../utils/file_utils';
|
||||
|
||||
var ReactS3FineUploader = React.createClass({
|
||||
|
||||
propTypes: {
|
||||
keyRoutine: React.PropTypes.shape({
|
||||
url: React.PropTypes.string,
|
||||
@ -125,6 +124,7 @@ var ReactS3FineUploader = React.createClass({
|
||||
bucket: 'ascribe0'
|
||||
},
|
||||
request: {
|
||||
//endpoint: 'https://www.ascribe.io.global.prod.fastly.net',
|
||||
endpoint: 'https://ascribe0.s3.amazonaws.com',
|
||||
accessKey: 'AKIAIVCZJ33WSCBQ3QDA'
|
||||
},
|
||||
@ -352,10 +352,11 @@ var ReactS3FineUploader = React.createClass({
|
||||
},
|
||||
|
||||
onComplete(id, name, res, xhr) {
|
||||
console.log(xhr);
|
||||
// there has been an issue with the server's connection
|
||||
if(xhr.status === 0) {
|
||||
|
||||
console.logGlobal(new Error('Complete was called but there wasn\t a success'), false, {
|
||||
if((xhr && xhr.status === 0) || res.error) {
|
||||
console.log('asdasdas');
|
||||
console.logGlobal(new Error(res.error || 'Complete was called but there wasn\t a success'), false, {
|
||||
files: this.state.filesToUpload,
|
||||
chunks: this.state.chunks
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user