Merge pull request #2743 from lbryio/patch
[patch] fix: thumbnail upload
This commit is contained in:
commit
2d828be42d
3 changed files with 5 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "LBRY",
|
"name": "LBRY",
|
||||||
"version": "0.35.0",
|
"version": "0.35.1",
|
||||||
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
|
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"lbry"
|
"lbry"
|
||||||
|
|
|
@ -2,11 +2,12 @@ import { connect } from 'react-redux';
|
||||||
import { doHideModal } from 'redux/actions/app';
|
import { doHideModal } from 'redux/actions/app';
|
||||||
import { doToast, doUploadThumbnail } from 'lbry-redux';
|
import { doToast, doUploadThumbnail } from 'lbry-redux';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
import path from 'path';
|
||||||
import ModalAutoGenerateThumbnail from './view';
|
import ModalAutoGenerateThumbnail from './view';
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
closeModal: () => dispatch(doHideModal()),
|
closeModal: () => dispatch(doHideModal()),
|
||||||
upload: buffer => dispatch(doUploadThumbnail(null, buffer, null, fs)),
|
upload: buffer => dispatch(doUploadThumbnail(null, buffer, null, fs, path)),
|
||||||
showToast: options => dispatch(doToast(options)),
|
showToast: options => dispatch(doToast(options)),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,12 @@ import { connect } from 'react-redux';
|
||||||
import { doHideModal } from 'redux/actions/app';
|
import { doHideModal } from 'redux/actions/app';
|
||||||
import { doUploadThumbnail, doUpdatePublishForm } from 'lbry-redux';
|
import { doUploadThumbnail, doUpdatePublishForm } from 'lbry-redux';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
import path from 'path';
|
||||||
import ModalConfirmThumbnailUpload from './view';
|
import ModalConfirmThumbnailUpload from './view';
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
closeModal: () => dispatch(doHideModal()),
|
closeModal: () => dispatch(doHideModal()),
|
||||||
upload: path => dispatch(doUploadThumbnail(path, null, null, fs)),
|
upload: filePath => dispatch(doUploadThumbnail(filePath, null, null, fs, path)),
|
||||||
updatePublishForm: value => dispatch(doUpdatePublishForm(value)),
|
updatePublishForm: value => dispatch(doUpdatePublishForm(value)),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue