1.3.5-6 - Prod Build - Add back filename.
This commit is contained in:
6
app.json
6
app.json
@@ -4,19 +4,19 @@
|
|||||||
"slug": "imexmobile",
|
"slug": "imexmobile",
|
||||||
"version": "1.3.7",
|
"version": "1.3.7",
|
||||||
"extra": {
|
"extra": {
|
||||||
"expover": "5"
|
"expover": "6"
|
||||||
},
|
},
|
||||||
"orientation": "default",
|
"orientation": "default",
|
||||||
"icon": "./assets/logo192noa.png",
|
"icon": "./assets/logo192noa.png",
|
||||||
"ios": {
|
"ios": {
|
||||||
"supportsTablet": true,
|
"supportsTablet": true,
|
||||||
"bundleIdentifier": "com.imex.imexmobile",
|
"bundleIdentifier": "com.imex.imexmobile",
|
||||||
"buildNumber": "5",
|
"buildNumber": "6",
|
||||||
"googleServicesFile": "./GoogleService-Info.plist"
|
"googleServicesFile": "./GoogleService-Info.plist"
|
||||||
},
|
},
|
||||||
"android": {
|
"android": {
|
||||||
"package": "com.imex.imexmobile",
|
"package": "com.imex.imexmobile",
|
||||||
"versionCode": 1100018,
|
"versionCode": 1100019,
|
||||||
"googleServicesFile": "./google-services.json"
|
"googleServicesFile": "./google-services.json"
|
||||||
},
|
},
|
||||||
"splash": {
|
"splash": {
|
||||||
|
|||||||
@@ -18,12 +18,13 @@ export const handleUpload = async (ev, context) => {
|
|||||||
const { bodyshop, jobId } = context;
|
const { bodyshop, jobId } = context;
|
||||||
|
|
||||||
const imageData = await MediaLibrary.getAssetInfoAsync(mediaId);
|
const imageData = await MediaLibrary.getAssetInfoAsync(mediaId);
|
||||||
const newFile = await (await fetch(imageData.uri)).blob();
|
const newFile = await (
|
||||||
|
await fetch(imageData.localUri || imageData.uri)
|
||||||
|
).blob();
|
||||||
let extension = imageData.localUri.split(".").pop();
|
let extension = imageData.localUri.split(".").pop();
|
||||||
let key = `${bodyshop.id}/${jobId}/${newFile.data.name.replace(
|
let key = `${bodyshop.id}/${jobId}/${(
|
||||||
/\.[^/.]+$/,
|
imageData.filename || imageData.uri.split("/").pop()
|
||||||
""
|
).replace(/\.[^/.]+$/, "")}-${new Date().getTime()}`;
|
||||||
)}-${new Date().getTime()}`;
|
|
||||||
|
|
||||||
const res = await uploadToCloudinary(
|
const res = await uploadToCloudinary(
|
||||||
key,
|
key,
|
||||||
|
|||||||
Reference in New Issue
Block a user