add remote publish url #401

Merged
jessopb merged 1 commit from feat-remotePublishUrl into master 2021-03-30 01:18:00 +02:00
3 changed files with 20 additions and 8 deletions

7
dist/bundle.es.js vendored
View file

@ -4777,7 +4777,8 @@ const doPublish = (success, fail, preview) => (dispatch, getState) => {
tags, tags,
locations, locations,
optimize, optimize,
isLivestreamPublish isLivestreamPublish,
remoteFileUrl
} = publishData; } = publishData;
// Handle scenario where we have a claim that has the same name as a channel we are publishing with. // 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 // 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 // Eventually we will allow users to enter their own tags on publish
// `nsfw` will probably be removed // `nsfw` will probably be removed
if (remoteFileUrl) {
publishPayload.remote_url = remoteFileUrl;
}
if (publishingLicense) { if (publishingLicense) {
publishPayload.license = publishingLicense; publishPayload.license = publishingLicense;
@ -5967,6 +5971,7 @@ const defaultState$4 = {
fileDur: 0, fileDur: 0,
fileSize: 0, fileSize: 0,
fileVid: false, fileVid: false,
remoteFileUrl: undefined,
contentIsFree: true, contentIsFree: true,
fee: { fee: {
amount: 1, amount: 1,

View file

@ -106,12 +106,12 @@ export const doUploadThumbnail = (
.then(json => { .then(json => {
return json.success return json.success
? dispatch({ ? dispatch({
type: ACTIONS.UPDATE_PUBLISH_FORM, type: ACTIONS.UPDATE_PUBLISH_FORM,
data: { data: {
uploadThumbnailStatus: THUMBNAIL_STATUSES.COMPLETE, uploadThumbnailStatus: THUMBNAIL_STATUSES.COMPLETE,
thumbnail: json.data.serveUrl, thumbnail: json.data.serveUrl,
}, },
}) })
: uploadError(json.message || downMessage); : uploadError(json.message || downMessage);
}) })
.catch(err => { .catch(err => {
@ -270,6 +270,7 @@ export const doPublish = (success: Function, fail: Function, preview: Function)
locations, locations,
optimize, optimize,
isLivestreamPublish, isLivestreamPublish,
remoteFileUrl,
} = publishData; } = publishData;
// Handle scenario where we have a claim that has the same name as a channel we are publishing with. // 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, blocking: boolean,
optimize_file?: boolean, optimize_file?: boolean,
preview?: boolean, preview?: boolean,
remote_url?: string,
} = { } = {
name, name,
title, 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 // 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 // Eventually we will allow users to enter their own tags on publish
// `nsfw` will probably be removed // `nsfw` will probably be removed
if (remoteFileUrl) {
publishPayload.remote_url = remoteFileUrl;
}
if (publishingLicense) { if (publishingLicense) {
publishPayload.license = publishingLicense; publishPayload.license = publishingLicense;
@ -407,7 +412,7 @@ export const doCheckReflectingFiles = () => (dispatch: Dispatch, getState: GetSt
const { checkingReflector } = state.claims; const { checkingReflector } = state.claims;
let reflectorCheckInterval; let reflectorCheckInterval;
const checkFileList = async() => { const checkFileList = async () => {
const state = getState(); const state = getState();
const reflectingById = selectReflectingById(state); const reflectingById = selectReflectingById(state);
const ids = Object.keys(reflectingById); const ids = Object.keys(reflectingById);

View file

@ -9,6 +9,7 @@ type PublishState = {
editingURI: ?string, editingURI: ?string,
fileText: ?string, fileText: ?string,
filePath: ?string, filePath: ?string,
remoteFileUrl: ?string,
contentIsFree: boolean, contentIsFree: boolean,
fileDur: number, fileDur: number,
fileSize: number, fileSize: number,
@ -44,6 +45,7 @@ const defaultState: PublishState = {
fileDur: 0, fileDur: 0,
fileSize: 0, fileSize: 0,
fileVid: false, fileVid: false,
remoteFileUrl: undefined,
contentIsFree: true, contentIsFree: true,
fee: { fee: {
amount: 1, amount: 1,