file.remote --> file.remote.host, since remote is an object

//cc @goto-bus-stop @ifedapoolarewaju
This commit is contained in:
Artur Paikin 2018-06-05 20:16:58 -04:00
parent a5f23c7fd5
commit aa8247b6e2

View file

@ -190,7 +190,7 @@ module.exports = class Transloadit extends Plugin {
// We only replace the hostname for Transloadit's uppy-servers, so that
// people can self-host them while still using Transloadit for encoding.
let remote = file.remote
if (file.remote && TL_UPPY_SERVER.test(file.remote)) {
if (file.remote && TL_UPPY_SERVER.test(file.remote.host)) {
let newHost = assembly.uppyserver_url
let path = file.remote.url.replace(file.remote.host, '')
// remove tailing slash