Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ your app ──── upload URL ────▶ <FastPixUploader /> ───
- [Import](#import)
- [Integration](#integration)
- [Providing the upload URL](#providing-the-upload-url)
- [Example project](#example-project)
- [Lifecycle Events](#lifecycle-events)
- [Composition](#composition)
- [Concepts](#concepts)
Expand Down Expand Up @@ -112,6 +113,10 @@ In practice you'll create the upload URL once a file is selected. Pass a functio

> **Note:** The signed URL is created through the [Upload media from device](https://fastpix.com/docs/video-on-demand-api/upload-and-import-videos/direct-upload-video-media) API. Keep that call on your server so your credentials are never exposed to the browser.

### Example project

A minimal, runnable React + Vite example lives in [`example/`](example). Run `npm install && npm run dev` in that folder to try the uploader end to end.

## Lifecycle Events

Pass callback props to respond to the upload lifecycle. All are optional.
Expand Down
2 changes: 2 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
12 changes: 12 additions & 0 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# FastPix React Uploader — Vite example

Minimal React + Vite app demonstrating `<FastPixUploader />` from the published
[`@fastpix/fp-react-uploader`](https://www.npmjs.com/package/@fastpix/fp-react-uploader)
package.

```bash
npm install
npm run dev
```

Open the printed URL, paste a FastPix signed upload URL, and pick a file.
12 changes: 12 additions & 0 deletions example/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>FastPix React Uploader — Example</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
Loading