From dd8fe34bb64d841a58e20f37ba8f979f3a719d2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Mon, 16 Nov 2015 15:15:55 +0100 Subject: [PATCH] Define more strict props & re-change method name to componentWillUpdate again --- js/components/ascribe_uploader/react_s3_fine_uploader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/ascribe_uploader/react_s3_fine_uploader.js b/js/components/ascribe_uploader/react_s3_fine_uploader.js index 685c2b2f..1c4de1d2 100644 --- a/js/components/ascribe_uploader/react_s3_fine_uploader.js +++ b/js/components/ascribe_uploader/react_s3_fine_uploader.js @@ -113,7 +113,7 @@ let ReactS3FineUploader = React.createClass({ // 'hash': upload using the hash // 'upload': upload full file (default if not specified) enableLocalHashing: React.PropTypes.bool, - uploadMethod: React.PropTypes.string, + uploadMethod: React.PropTypes.oneOf(['hash', 'upload']), // A class of a file the user has to upload // Needs to be defined both in singular as well as in plural @@ -202,7 +202,7 @@ let ReactS3FineUploader = React.createClass({ }; }, - componentWillReceiveProps() { + componentWillUpdate() { // since the csrf header is defined in this component's props, // everytime the csrf cookie is changed we'll need to reinitalize // fineuploader and update the actual csrf token