Resolve image/video issues during upload by using local URI.
This commit is contained in:
@@ -57,6 +57,10 @@ export function ImageBrowserScreen({
|
||||
}
|
||||
|
||||
const onDone = async (data) => {
|
||||
console.log(
|
||||
"🚀 ~ file: screen-media-browser.component.jsx ~ line 60 ~ data",
|
||||
data
|
||||
);
|
||||
logImEXEvent("imexmobile_upload_documents", { count: data.length });
|
||||
|
||||
//Validate to make sure the totals for the file sizes do not exceed the total on the job.
|
||||
@@ -73,6 +77,7 @@ export function ImageBrowserScreen({
|
||||
const totalOfUploads = await data.reduce(async (acc, val) => {
|
||||
//Get the size of the file based on URI.
|
||||
const info = await FileSystem.getInfoAsync(val.uri, { size: true });
|
||||
|
||||
return (await acc) + info.size;
|
||||
}, 0);
|
||||
|
||||
@@ -112,7 +117,7 @@ export function ImageBrowserScreen({
|
||||
const result = await handleUpload(
|
||||
{
|
||||
//iOS provides the file name. Android does not.
|
||||
uri: p.uri,
|
||||
|
||||
filename,
|
||||
mediaId: p.id,
|
||||
onError: handleOnError,
|
||||
|
||||
Reference in New Issue
Block a user