Skip to content

resolveUploadSize — @gj-kit/expo-media

A public function from @gj-kit/expo-media/core. The signature below is taken directly from the 0.6.1 release declaration.

import { resolveUploadSize } from '@gj-kit/expo-media/core';
/**
* 세 후보 중 가장 신뢰도 높은 것을 고른다. 전부 없으면 `null` —
* 호출자가 `imageSizeUnknown`/`videoSizeUnknown` 문구로 실패시킨다(§6.1-⑮, 전신 유지).
*
* ⚠ 순서를 바꾸면 Android 재인코딩 자산이 다시 원본 크기로 presign된다.
*/
declare function resolveUploadSize(input: {
/** 어댑터가 "실제로 스트리밍될 파일"을 stat해 확인한 크기(§3.3 `PickedAsset.verifiedSizeBytes`). */
readonly verifiedSizeBytes?: number | undefined;
/** 코어가 `FileSystemAdapter.stat`으로 방금 읽은 크기. */
readonly statSizeBytes?: number | undefined;
/** ⚠ 피커 자칭(`asset.fileSize`). 최후 폴백이며 단독으로는 신뢰하지 않는다. */
readonly reportedSizeBytes?: number | undefined;
}): {
readonly sizeBytes: number;
readonly source: UploadSizeSource;
} | null;

This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.

  • Package: @gj-kit/expo-media
  • Version: 0.6.1
  • Public entry: ./core
  • Source: GitHub