diff --git a/src/platforms/web/publish.js b/src/platforms/web/publish.js index 90f6c69c4..33eedf3a5 100644 --- a/src/platforms/web/publish.js +++ b/src/platforms/web/publish.js @@ -7,6 +7,7 @@ */ import { X_LBRY_AUTH_TOKEN } from 'constants/token'; import { doUpdateUploadProgress } from 'lbryinc'; +import { apiCall } from 'lbry-redux'; // A modified version of Lbry.apiCall that allows // to perform calling methods at arbitrary urls @@ -19,11 +20,19 @@ export default function apiPublishCallViaWeb( resolve: Function, reject: Function ) { + const { file_path: filePath } = params; + + if (!filePath) { + return apiCall(method, params, resolve, reject); + } + const counter = new Date().getTime(); - const fileField = params.file_path; + const fileField = filePath; + // Putting a dummy value here, the server is going to process the POSTed file // and set the file_path itself params.file_path = '__POST_FILE__'; + const jsonPayload = JSON.stringify({ jsonrpc: '2.0', method, diff --git a/static/app-strings.json b/static/app-strings.json index 08ba47933..04be334be 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -826,6 +826,11 @@ "Discussion": "Discussion", "If you don't choose a file, the file from your existing claim %name% will be used": "If you don't choose a file, the file from your existing claim %name% will be used", "To enable this feature, check 'Save Password' the next time you start the app.": "To enable this feature, check 'Save Password' the next time you start the app.", + "for adding a subscription!": "for adding a subscription!", + "Claiming...": "Claiming...", + "for viewing content today!": "for viewing content today!", + "for your first publish!": "for your first publish!", + "for having many downloads!": "for having many downloads!", "An email address is required to sync your account.": "An email address is required to sync your account.", "Sign Out": "Sign Out", "Portuguese": "Portuguese",