Skip to content

createPickerFlows — @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 { createPickerFlows } from '@gj-kit/expo-media/core';
declare function createPickerFlows<TAsset, TCollectionId extends string = string>(input: {
readonly picker: PickerAdapter;
readonly uploads: LocalUploads<TAsset, TCollectionId>;
readonly platform: PlatformAdapter;
readonly strings?: MediaStrings | undefined;
/**
* 웹 경로에서 `asset.fileName`이 없을 때 생성되는 폴백 파일명의 접두사.
* 전신은 uploader의 `fileNamePrefix`를 썼다(uploader.ts:701) — 생략하면 `mediaFileName`
* 기본값(`'media'`)이 되어 호스트 접두사가 웹 경로에서만 달라진다.
* 네이티브 경로는 `uploads`가 이미 자기 접두사를 갖고 있으므로 영향받지 않는다.
*/
readonly fileNamePrefix?: string | undefined;
/**
* ⚠ `platform.os === 'web'`에서 피커 자산을 업로드하려면 **필수**. 없으면
* `MediaError('platform-unsupported')`. 조건부 타입 0 — 런타임 분기다(§3.1).
*
* 실측 근거(§5.7.4/V9-d): memorylog2 `app/profile-edit.tsx:137`의 `pickAndUploadPhoto()`에는
* **플랫폼 게이트가 없다**. 웹에서 그 호출은 전신 uploader.ts:692-710으로 들어가
* `fetch(asset.uri)` → Blob → `uploadImageBlob({ fallbackExif: asset.exif })`를 탔다.
* 그 경로를 잃지 않으려면 변환 담당자(`loader`)와 업로더(`uploads`)가 여기 주입돼야 한다.
*/
readonly web?: {
readonly uploads: BinaryUploads<TAsset, TCollectionId>;
readonly loader: BinarySourceLoader;
} | undefined;
}): PickerFlows<TAsset, TCollectionId>;

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