Add IMS Token.
This commit is contained in:
@@ -7,9 +7,13 @@ import * as ImageManipulator from "expo-image-manipulator";
|
||||
export const handleLocalUpload = async ({ ev, context }) => {
|
||||
const { onError, onSuccess, onProgress, filename, mediaId } = 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 });
|
||||
},
|
||||
@@ -57,7 +61,6 @@ export const handleLocalUpload = async ({ ev, context }) => {
|
||||
}
|
||||
|
||||
formData.append("file", fileData);
|
||||
const bodyshop = store.getState().user.bodyshop;
|
||||
|
||||
try {
|
||||
const imexMediaServerResponse = await axios.post(
|
||||
|
||||
Reference in New Issue
Block a user