Added IMS token changes.

This commit is contained in:
Patrick Fic
2022-05-11 16:31:09 -07:00
parent bbf908e5e1
commit 55144bd621
12 changed files with 65 additions and 17 deletions

View File

@@ -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(