From 15ab81f8255532b650a9aedf5583e741124b40be Mon Sep 17 00:00:00 2001 From: James Calfee <james@jcalfee.info> Date: Thu, 20 Oct 2016 14:13:04 -0500 Subject: [PATCH] Configurable image upload server url. #185 --- app/redux/UserSaga.js | 3 +-- server/index.js | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/redux/UserSaga.js b/app/redux/UserSaga.js index ede6ae8bf..9bc6ed331 100644 --- a/app/redux/UserSaga.js +++ b/app/redux/UserSaga.js @@ -350,7 +350,6 @@ function* lookupPreviousOwnerAuthority({payload: {}}) { } import {Signature, hash} from 'shared/ecc' -// import request from 'request' function* uploadImageWatch() { yield* takeLatest('user/UPLOAD_IMAGE', uploadImage); @@ -411,7 +410,7 @@ function* uploadImage({payload: {file, dataUrl, filename = 'image.txt', progress } const sig = Signature.signBufferSha256(bufSha, d) - const postUrl = `http://localhost:3234/${username}/${sig.toHex()}` + const postUrl = `${$STM_Config.uploadImage}/${username}/${sig.toHex()}` fetch(postUrl, { method: 'post', diff --git a/server/index.js b/server/index.js index 67c8e514d..e49db82fa 100644 --- a/server/index.js +++ b/server/index.js @@ -20,7 +20,8 @@ global.$STM_Config = { ipfs_prefix: config.ipfs_prefix, disable_signups: config.disable_signups, read_only_mode: config.read_only_mode, - registrar_fee: config.registrar.fee + registrar_fee: config.registrar.fee, + uploadImage: config.uploadImage, }; const WebpackIsomorphicTools = require('webpack-isomorphic-tools'); -- GitLab