GitXplorerGitXplorer
n

convex_file_storage_urls_old

public
0 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
eda541d05fc2d3cccd7e9be9b514784b18c1470d

Redo more stuff

nnipunn1313 committed 4 months ago
Unverified
85252c1e4b2a6c1c86134414b78fd359624f6544

More fiddling

nnipunn1313 committed 4 months ago
Unverified
168b118aa64b00ee4648d1672d048ac9b2b3b80e

More fiddling

nnipunn1313 committed 4 months ago
Unverified
2d96816667a9f3e52f0c8a985e8d4df71f361dd0

Add site url

nnipunn1313 committed 4 months ago
Unverified
f7a53bdc005a8055f7a7038bf728777a9234afce

Reorganize

nnipunn1313 committed 4 months ago
Unverified
5874e82cf508a44647f5fa9ab88c07e88422c4aa

Switch the UI on the example

nnipunn1313 committed 4 months ago

README

The README file for this repository.

File Storage URLs Component

Convex component for serving files from time-limited URLs.

In your convex/app.config.ts

const c = app.install(fileStorageUrls, { args: {} });
app.mountHttp("/storage/", c);

This will export a generateUrl mutation with args {storageId: Id<"_storage">, expiresInMillis: number} It will mount an endpoint /storage/get which will fetch the URL, but enforce expiration.

It is implemented with a table that is cleaned up automatically via a cron.

Tests are in file_storage_urls/serve.test.ts