-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
convex-replicate is great for offline‑first apps, but handling file uploads to Convex storage is still manual and repetitive.
It would be very helpful to have a built‑in offline file upload API that:
- Takes a local file path (e.g. from Expo’s
Assetorexpo-file-system). - Stores the file path and metadata locally in the replicate SQLite DB.
- Automatically uploads the file to Convex storage when online.
- Saves the
storageIdback to Convex and syncs it. - Handles retries and errors.
Example:
const uploadId = await replicate.queueFileUpload({
localPath: "/assets/photo.jpg",
mimeType: "image/jpeg",
target: { table: "posts", field: "coverImageId" }
});
const status = await replicate.getUploadStatus(uploadId);
// → { status: "pending" | "uploading" | "uploaded" | "failed", storageId, error }This would make it much easier to build offline‑first apps with file uploads on Expo/React Native.
Metadata
Metadata
Assignees
Labels
No labels