Update env. vars and remove logs.

This commit is contained in:
Patrick Fic
2021-05-20 16:14:35 -07:00
parent 5647a52ef0
commit 130dac3921
4 changed files with 18 additions and 26 deletions

View File

@@ -8,12 +8,12 @@
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.imex.imexmobile",
"buildNumber": "1.0.12",
"buildNumber": "1.0.12-1",
"googleServicesFile": "./GoogleService-Info.plist"
},
"android": {
"package": "com.imex.imexmobile",
"versionCode": 12,
"versionCode": 1001201,
"googleServicesFile": "./google-services.json"
},
"splash": {

View File

@@ -52,7 +52,6 @@ export function ImageBrowserScreen({
const client = useApolloClient();
async function handleOnSuccess(uri, id) {
console.log("Succesful upload!", uri);
logImEXEvent("imexmobile_successful_upload");
setUploads((prevUploads) => _.omit(prevUploads, uri));
}
@@ -77,17 +76,17 @@ export function ImageBrowserScreen({
return (await acc) + info.size;
}, 0);
console.log(
"Size of uploaded documents.",
queryData.data.documents_aggregate.aggregate.sum.size,
"Shop Limit",
bodyshop.jobsizelimit,
"Space remaining",
bodyshop.jobsizelimit -
queryData.data.documents_aggregate.aggregate.sum.size,
"Total of uploaded files",
totalOfUploads
);
// console.log(
// "Size of uploaded documents.",
// queryData.data.documents_aggregate.aggregate.sum.size,
// "Shop Limit",
// bodyshop.jobsizelimit,
// "Space remaining",
// bodyshop.jobsizelimit -
// queryData.data.documents_aggregate.aggregate.sum.size,
// "Total of uploaded files",
// totalOfUploads
// );
if (
bodyshop.jobsizelimit -
@@ -108,7 +107,7 @@ export function ImageBrowserScreen({
let filename;
//Appears to work for android.
//iOS provides the filename, android doe snot.
console.log("pid", p.id);
filename = p.filename || p.uri.split("/").pop();
const result = await handleUpload(
{
@@ -133,10 +132,7 @@ export function ImageBrowserScreen({
if (deleteAfterUpload) {
try {
const result = await MediaLibrary.deleteAssetsAsync(
ret.map((r) => r.mediaId)
);
console.log("Delete result :>> ", result);
await MediaLibrary.deleteAssetsAsync(ret.map((r) => r.mediaId));
} catch (error) {
console.log("Unable to delete picture.", error);
}

1
env.js
View File

@@ -45,7 +45,6 @@ function getEnvVars() {
let env = process.env.NODE_ENV;
if (env === null || env === undefined || env === "") return ENV.dev;
if (env.indexOf("dev") !== -1) return ENV.dev;
if (env.indexOf("staging") !== -1) return ENV.staging;
if (env.indexOf("prod") !== -1) return ENV.prod;
else return ENV.prod;
}

View File

@@ -57,7 +57,7 @@ export const uploadToCloudinary = async (
tagsArray ? tagsArray.map((tag) => `${tag},`) : ""
}`;
// let eager = process.env.REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS;
console.log("fileType", fileType);
const upload_preset = fileType.startsWith("video")
? "incoming_upload_video"
: "incoming_upload";
@@ -134,12 +134,9 @@ export const uploadToCloudinary = async (
if (onError) onError(cloudinaryUploadResponse.statusText);
return { success: false, error: cloudinaryUploadResponse.statusText };
}
console.log("mediaId", mediaId);
const imageData = await MediaLibrary.getAssetInfoAsync(mediaId);
console.log(
"🚀 ~ file: document-upload.utility.js ~ line 140 ~ imageData",
imageData.creationTime
);
//Insert the document with the matching key.
const documentInsert = await client.mutate({
mutation: INSERT_NEW_DOCUMENT,