Skip to content

@gj-kit/expo-media

A hardened Expo and React Native media pipeline with explicit adapters and durable file boundaries.

Current npm latest: 0.6.1

Use it for media selection, upload preparation, hashing, device-library access, and durable local files while your app keeps its own API and storage policy.

Do not put record ownership, presign authorization, or orphan-cleanup policy in this library.

Outcome: An Expo-backed media kit while your application keeps upload authorization.

Terminal window
pnpm add @gj-kit/expo-media

Implement uploadApi in your app for upload intent and completion, then declare explicit file limits.

Copy this first, then replace only the app-owned values named above.

import { createMediaKit, type MediaUploadApi } from '@gj-kit/expo-media';
type Asset = { readonly id: string };
declare const uploadApi: MediaUploadApi<Asset>; // Your app owns auth and upload URLs.
export const media = createMediaKit({
api: uploadApi,
limits: { image: { maxBytes: 15 * 1024 * 1024 } },
});

Engines: node >=20

Peer Supported range Required for
expo >=56.0.0 <58.0.0 documented optional subpaths only
expo-file-system >=56.0.0 documented optional subpaths only
expo-image-manipulator >=56.0.0 documented optional subpaths only
expo-image-picker >=16.0.0 documented optional subpaths only
expo-media-library >=56.0.5 documented optional subpaths only
expo-video-thumbnails >=8.0.0 documented optional subpaths only
react-native >=0.71.0 documented optional subpaths only
Entry Exported symbols
Root entry 167
./core 157
./device 1
./image 12
./image/pure 6
./picker 1
./save 1
./storage 10
./testing 36
./video 1
./web 5

Never expose presigned URLs or native URI details in public errors. Keep cleanup authorization and attachment transactions in the consuming application.

complete API reference contains every public function, class, type, constant, and error contract generated from release declarations. Each item shows its import path, release signature, and package version.

@gj-kit/expo-ui, @gj-kit/expo-auth

npm · GitHub