From 1db9921dd84af069313dcebfa23036a05ef44e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Wed, 1 Jul 2015 10:00:53 +0200 Subject: [PATCH] use safe urls for thumbnails and links --- .../ascribe_uploader/file_drag_and_drop_preview.js | 4 ++-- .../file_drag_and_drop_preview_image.js | 4 ++-- .../file_drag_and_drop_preview_other.js | 4 ++-- .../ascribe_uploader/react_s3_fine_uploader.js | 10 +++++++--- sass/ascribe_uploader.scss | 8 ++++++++ 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/js/components/ascribe_uploader/file_drag_and_drop_preview.js b/js/components/ascribe_uploader/file_drag_and_drop_preview.js index 84853018..c58f6a38 100644 --- a/js/components/ascribe_uploader/file_drag_and_drop_preview.js +++ b/js/components/ascribe_uploader/file_drag_and_drop_preview.js @@ -57,7 +57,7 @@ let FileDragAndDropPreview = React.createClass({ url={this.props.file.url} toggleUploadProcess={this.toggleUploadProcess} areAssetsDownloadable={this.props.areAssetsDownloadable} - downloadFile={this.handleDownloadFile}/>); + downloadUrl={this.props.file.s3UrlSafe}/>); } else { previewElement = (); + downloadUrl={this.props.file.s3UrlSafe}/>); } return ( diff --git a/js/components/ascribe_uploader/file_drag_and_drop_preview_image.js b/js/components/ascribe_uploader/file_drag_and_drop_preview_image.js index 1cbf67e6..04d35a47 100644 --- a/js/components/ascribe_uploader/file_drag_and_drop_preview_image.js +++ b/js/components/ascribe_uploader/file_drag_and_drop_preview_image.js @@ -10,7 +10,7 @@ let FileDragAndDropPreviewImage = React.createClass({ progress: React.PropTypes.number, url: React.PropTypes.string, toggleUploadProcess: React.PropTypes.func, - downloadFile: React.PropTypes.func, + downloadUrl: React.PropTypes.string, areAssetsDownloadable: React.PropTypes.bool }, @@ -48,7 +48,7 @@ let FileDragAndDropPreviewImage = React.createClass({ // only if assets are actually downloadable, there should be a download icon if the process is already at // 100%. If not, no actionSymbol should be displayed if(this.props.areAssetsDownloadable) { - actionSymbol =