Added IMS token changes.
This commit is contained in:
@@ -7,8 +7,12 @@ export const handleUpload = async ({ ev, context }) => {
|
||||
const { onError, onSuccess, onProgress, file } = ev;
|
||||
const { jobid, invoice_number, vendorid, callbackAfterUpload } = context;
|
||||
|
||||
const bodyshop = store.getState().user.bodyshop;
|
||||
var options = {
|
||||
headers: { "X-Requested-With": "XMLHttpRequest" },
|
||||
headers: {
|
||||
"X-Requested-With": "XMLHttpRequest",
|
||||
ims_token: bodyshop.localmediatoken,
|
||||
},
|
||||
onUploadProgress: (e) => {
|
||||
if (!!onProgress) onProgress({ percent: (e.loaded / e.total) * 100 });
|
||||
},
|
||||
@@ -22,7 +26,6 @@ export const handleUpload = async ({ ev, context }) => {
|
||||
formData.append("vendorid", vendorid);
|
||||
}
|
||||
formData.append("file", file);
|
||||
const bodyshop = store.getState().user.bodyshop;
|
||||
|
||||
const imexMediaServerResponse = await cleanAxios.post(
|
||||
normalizeUrl(
|
||||
|
||||
Reference in New Issue
Block a user