1
0
mirror of https://github.com/ascribe/onion.git synced 2025-01-03 10:25:08 +01:00

Remove uploadStarted prop from ReactS3Fineuploader as it was replaced with setIsUploadReady

This commit is contained in:
Tim Daubenschütz 2015-11-17 12:03:22 +01:00
parent 16840a6136
commit a8ccf13f91
3 changed files with 0 additions and 15 deletions

View File

@ -13,7 +13,6 @@ import { getCookie } from '../../utils/fetch_api_utils';
let FurtherDetailsFileuploader = React.createClass({ let FurtherDetailsFileuploader = React.createClass({
propTypes: { propTypes: {
uploadStarted: React.PropTypes.func,
pieceId: React.PropTypes.number, pieceId: React.PropTypes.number,
otherData: React.PropTypes.arrayOf(React.PropTypes.object), otherData: React.PropTypes.arrayOf(React.PropTypes.object),
setIsUploadReady: React.PropTypes.func, setIsUploadReady: React.PropTypes.func,
@ -46,7 +45,6 @@ let FurtherDetailsFileuploader = React.createClass({
name="other_data_key" name="other_data_key"
label="Additional files"> label="Additional files">
<ReactS3FineUploader <ReactS3FineUploader
uploadStarted={this.props.uploadStarted}
keyRoutine={{ keyRoutine={{
url: AppConstants.serverUrl + 's3/key/', url: AppConstants.serverUrl + 's3/key/',
fileClass: 'otherdata', fileClass: 'otherdata',

View File

@ -93,7 +93,6 @@ let ReactS3FineUploader = React.createClass({
retry: React.PropTypes.shape({ retry: React.PropTypes.shape({
enableAuto: React.PropTypes.bool enableAuto: React.PropTypes.bool
}), }),
uploadStarted: React.PropTypes.func,
setIsUploadReady: React.PropTypes.func, setIsUploadReady: React.PropTypes.func,
isReadyForFormSubmission: React.PropTypes.func, isReadyForFormSubmission: React.PropTypes.func,
areAssetsDownloadable: React.PropTypes.bool, areAssetsDownloadable: React.PropTypes.bool,
@ -672,11 +671,6 @@ let ReactS3FineUploader = React.createClass({
// override standard files list with only valid files // override standard files list with only valid files
files = validFiles; files = validFiles;
// Call this method to signal the outside component that an upload is in progress
if(typeof this.props.uploadStarted === 'function' && files.length > 0) {
this.props.uploadStarted();
}
// if multiple is set to false and user drops multiple files into the dropzone, // if multiple is set to false and user drops multiple files into the dropzone,
// take the first one and notify user that only one file can be submitted // take the first one and notify user that only one file can be submitted
if(!this.props.multiple && files.length > 1) { if(!this.props.multiple && files.length > 1) {

View File

@ -64,12 +64,6 @@ let CylandAdditionalDataForm = React.createClass({
}, },
uploadStarted() {
this.setState({
isUploadReady: false
});
},
setIsUploadReady(isReady) { setIsUploadReady(isReady) {
this.setState({ this.setState({
isUploadReady: isReady isUploadReady: isReady
@ -184,7 +178,6 @@ let CylandAdditionalDataForm = React.createClass({
</Property> </Property>
<FurtherDetailsFileuploader <FurtherDetailsFileuploader
label={getLangText('Additional files (e.g. still images, pdf)')} label={getLangText('Additional files (e.g. still images, pdf)')}
uploadStarted={this.uploadStarted}
submitFile={this.submitFile} submitFile={this.submitFile}
setIsUploadReady={this.setIsUploadReady} setIsUploadReady={this.setIsUploadReady}
isReadyForFormSubmission={formSubmissionValidation.fileOptional} isReadyForFormSubmission={formSubmissionValidation.fileOptional}