Skip to content

Add built‑in offline file upload support for Convex storage #5

Description

@mnsuccess

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 Asset or expo-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 storageId back 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions