From 943f854fcc9e4c1665e15a023235fb4ee811f34d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Tue, 1 Sep 2015 16:57:58 +0200 Subject: [PATCH 1/2] change cdn to fastly --- js/components/ascribe_uploader/react_s3_fine_uploader.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/components/ascribe_uploader/react_s3_fine_uploader.js b/js/components/ascribe_uploader/react_s3_fine_uploader.js index 8ecaf40b..a1f76086 100644 --- a/js/components/ascribe_uploader/react_s3_fine_uploader.js +++ b/js/components/ascribe_uploader/react_s3_fine_uploader.js @@ -125,7 +125,8 @@ var ReactS3FineUploader = React.createClass({ bucket: 'ascribe0' }, request: { - endpoint: 'https://ascribe0.s3.amazonaws.com', + endpoint: 'https://www.ascribe.io.global.prod.fastly.net', + //endpoint: 'https://ascribe0.s3.amazonaws.com', accessKey: 'AKIAIVCZJ33WSCBQ3QDA' }, uploadSuccess: { From a4a0e9d149dd5608bef66eae5655a171bb1fd204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Fri, 4 Sep 2015 15:54:49 +0200 Subject: [PATCH 2/2] catch error in onComplete for fineuploader --- js/components/ascribe_uploader/react_s3_fine_uploader.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/js/components/ascribe_uploader/react_s3_fine_uploader.js b/js/components/ascribe_uploader/react_s3_fine_uploader.js index 8ecaf40b..ff72813b 100644 --- a/js/components/ascribe_uploader/react_s3_fine_uploader.js +++ b/js/components/ascribe_uploader/react_s3_fine_uploader.js @@ -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 });