mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
client: adapted code to use <base> HTML tag
This commit is contained in:
committed by
Marcin Kurczewski
parent
b29bf8b37a
commit
defada45ab
@ -256,7 +256,7 @@ class Api extends events.EventTarget {
|
||||
|
||||
_getFullUrl(url) {
|
||||
const fullUrl =
|
||||
('/api/' + url).replace(/([^:])\/+/g, '$1/');
|
||||
('api/' + url).replace(/([^:])\/+/g, '$1/');
|
||||
const matches = fullUrl.match(/^([^?]*)\??(.*)$/);
|
||||
const baseUrl = matches[1];
|
||||
const request = matches[2];
|
||||
@ -327,7 +327,7 @@ class Api extends events.EventTarget {
|
||||
let abortFunction = () => {};
|
||||
let returnedPromise = new Promise((resolve, reject) => {
|
||||
let uploadPromise = this._rawRequest(
|
||||
'/uploads', request.post, {}, {content: file}, options);
|
||||
'uploads', request.post, {}, {content: file}, options);
|
||||
abortFunction = () => uploadPromise.abort();
|
||||
return uploadPromise.then(
|
||||
response => {
|
||||
|
Reference in New Issue
Block a user