diff --git a/dist/bundle.es.js b/dist/bundle.es.js index 8c8e247..14493ee 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -4777,7 +4777,8 @@ const doPublish = (success, fail, preview) => (dispatch, getState) => { tags, locations, optimize, - isLivestreamPublish + isLivestreamPublish, + remoteFileUrl } = publishData; // Handle scenario where we have a claim that has the same name as a channel we are publishing with. @@ -4812,6 +4813,9 @@ const doPublish = (success, fail, preview) => (dispatch, getState) => { // Temporary solution to keep the same publish flow with the new tags api // Eventually we will allow users to enter their own tags on publish // `nsfw` will probably be removed + if (remoteFileUrl) { + publishPayload.remote_url = remoteFileUrl; + } if (publishingLicense) { publishPayload.license = publishingLicense; @@ -5967,6 +5971,7 @@ const defaultState$4 = { fileDur: 0, fileSize: 0, fileVid: false, + remoteFileUrl: undefined, contentIsFree: true, fee: { amount: 1, diff --git a/src/redux/actions/publish.js b/src/redux/actions/publish.js index 52cba30..4732ebd 100644 --- a/src/redux/actions/publish.js +++ b/src/redux/actions/publish.js @@ -106,12 +106,12 @@ export const doUploadThumbnail = ( .then(json => { return json.success ? dispatch({ - type: ACTIONS.UPDATE_PUBLISH_FORM, - data: { - uploadThumbnailStatus: THUMBNAIL_STATUSES.COMPLETE, - thumbnail: json.data.serveUrl, - }, - }) + type: ACTIONS.UPDATE_PUBLISH_FORM, + data: { + uploadThumbnailStatus: THUMBNAIL_STATUSES.COMPLETE, + thumbnail: json.data.serveUrl, + }, + }) : uploadError(json.message || downMessage); }) .catch(err => { @@ -270,6 +270,7 @@ export const doPublish = (success: Function, fail: Function, preview: Function) locations, optimize, isLivestreamPublish, + remoteFileUrl, } = publishData; // Handle scenario where we have a claim that has the same name as a channel we are publishing with. @@ -309,6 +310,7 @@ export const doPublish = (success: Function, fail: Function, preview: Function) blocking: boolean, optimize_file?: boolean, preview?: boolean, + remote_url?: string, } = { name, title, @@ -324,6 +326,9 @@ export const doPublish = (success: Function, fail: Function, preview: Function) // Temporary solution to keep the same publish flow with the new tags api // Eventually we will allow users to enter their own tags on publish // `nsfw` will probably be removed + if (remoteFileUrl) { + publishPayload.remote_url = remoteFileUrl; + } if (publishingLicense) { publishPayload.license = publishingLicense; @@ -407,7 +412,7 @@ export const doCheckReflectingFiles = () => (dispatch: Dispatch, getState: GetSt const { checkingReflector } = state.claims; let reflectorCheckInterval; - const checkFileList = async() => { + const checkFileList = async () => { const state = getState(); const reflectingById = selectReflectingById(state); const ids = Object.keys(reflectingById); diff --git a/src/redux/reducers/publish.js b/src/redux/reducers/publish.js index 124f6cb..e89564d 100644 --- a/src/redux/reducers/publish.js +++ b/src/redux/reducers/publish.js @@ -9,6 +9,7 @@ type PublishState = { editingURI: ?string, fileText: ?string, filePath: ?string, + remoteFileUrl: ?string, contentIsFree: boolean, fileDur: number, fileSize: number, @@ -44,6 +45,7 @@ const defaultState: PublishState = { fileDur: 0, fileSize: 0, fileVid: false, + remoteFileUrl: undefined, contentIsFree: true, fee: { amount: 1,