mirror of
https://github.com/ascribe/onion.git
synced 2025-01-03 10:25:08 +01:00
Sync thumbnail uploader to digitalWork uploader in RegisterPieceForm
This commit is contained in:
parent
2dcd375850
commit
6d08540d8b
@ -93,10 +93,19 @@ let RegisterPieceForm = React.createClass({
|
||||
const thumbnailKeyDialogExpanded = AppConstants.supportedThumbnailFileFormats.indexOf(mimeSubType) === -1;
|
||||
this.setState({ thumbnailKeyDialogExpanded });
|
||||
} else {
|
||||
this.refs.form.refs.thumbnail_file.reset();
|
||||
this.refs.form.refs.digital_work_key.reset();
|
||||
this.setState({ thumbnailKeyDialogExpanded: false });
|
||||
}
|
||||
},
|
||||
|
||||
handleSelectFilesThumbnail([thumbnailFile, ]) {
|
||||
// This is truly terrible, but at least we're not coding this mess into ReactS3Fineuploader
|
||||
let file = this.refs.form.refs.digital_work_key.refs.input.refs.fineuploader.state.filesToUpload[0];
|
||||
file.type = thumbnailFile.type;
|
||||
file.url = thumbnailFile.url;
|
||||
},
|
||||
|
||||
render() {
|
||||
const { disabled,
|
||||
handleSuccess,
|
||||
@ -168,6 +177,7 @@ let RegisterPieceForm = React.createClass({
|
||||
createBlobRoutine={{
|
||||
url: ApiUrls.blob_thumbnails
|
||||
}}
|
||||
handleSelectFiles={this.handleSelectFilesThumbnail}
|
||||
isReadyForFormSubmission={formSubmissionValidation.atLeastOneUploadedFile}
|
||||
keyRoutine={{
|
||||
url: AppConstants.serverUrl + 's3/key/',
|
||||
|
@ -3,7 +3,7 @@
|
||||
cursor: default !important;
|
||||
display: block;
|
||||
height: auto;
|
||||
margin-top: 1em;
|
||||
/* margin-top: 1em; */
|
||||
outline: 1px dashed #9e9e9e;
|
||||
overflow: auto;
|
||||
text-align: center;
|
||||
|
Loading…
Reference in New Issue
Block a user