MCPcopy Index your code
hub / github.com/CapSoftware/Cap / getLocalFileSize

Function getLocalFileSize

apps/mobile/src/api/mobile.ts:318–324  ·  view source on GitHub ↗
(file: UploadFile)

Source from the content-addressed store, hash-verified

316 uri.startsWith("file://") || uri.startsWith("content://");
317
318const getLocalFileSize = async (file: UploadFile) => {
319 if (typeof file.size === "number" && file.size > 0) return file.size;
320
321 const info = await FileSystem.getInfoAsync(file.uri);
322 if (!info.exists || info.isDirectory) return 0;
323 return info.size;
324};
325
326const uploadNativeFile = async (
327 method: "POST" | "PUT",

Callers 1

uploadToTargetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected