import axios from './axios' const config = { maxUploadSize: 1024 * 1024 * 1024, //size in bytes: 10 * 1024 * 1024 batchWatcher: { interval: 10000, //interval between batch checks maxTries: 20, //max amount of batch watcher retries }, } /** * loads config from backend and combines with local values */ export default new Promise((resolve, reject) => { axios.get('management/info').then(response => { config.app = response.data.app config.analysis = response.data.analysis config.maxUploadSize = parseInt(response.data.limits.multipart.maxFileSize) * 1024 * 1024 resolve(config) }, reject) })