329d434c83
* Allow only images in modal image uploader. * Set file path and mime in file selector. * Refactor WebFile. * Update get-file-from-path to work with folders; fix file-list component. * Get rid of File | string for filePath property in components. * Show instant preview while updating channel thumbnail. * Fix publish. * Add jpeg and svg to image filter.
12 lines
561 B
JavaScript
12 lines
561 B
JavaScript
import { connect } from 'react-redux';
|
|
import { doHideModal } from 'redux/actions/app';
|
|
import { doUploadThumbnail, doUpdatePublishForm } from 'redux/actions/publish';
|
|
import ModalConfirmThumbnailUpload from './view';
|
|
|
|
const perform = (dispatch) => ({
|
|
closeModal: () => dispatch(doHideModal()),
|
|
upload: (fileWithPath, cb) => dispatch(doUploadThumbnail(null, fileWithPath.file, null, null, fileWithPath.path, cb)),
|
|
updatePublishForm: (value) => dispatch(doUpdatePublishForm(value)),
|
|
});
|
|
|
|
export default connect(null, perform)(ModalConfirmThumbnailUpload);
|