-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e98edab
commit 4d55f54
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# UploadThing | ||
|
||
Store data using UploadThing. | ||
|
||
::note{to="https://uploadthing.com/"} | ||
Learn more about UploadThing. | ||
:: | ||
|
||
```js | ||
import { createStorage } from "unstorage"; | ||
import uploadthingDriver from "unstorage/drivers/uploadthing"; | ||
|
||
const storage = createStorage({ | ||
driver: uploadthingDriver({ | ||
// apiKey: "<your api key>", | ||
}), | ||
}); | ||
``` | ||
|
||
To use, you will need to install `uploadthing` dependency in your project: | ||
|
||
```json | ||
{ | ||
"dependencies": { | ||
"uploadthing": "latest" | ||
} | ||
} | ||
``` | ||
|
||
**Options:** | ||
|
||
- `apiKey`: Your UploadThing API key. Will be automatically inferred from the `UPLOADTHING_SECRET` environment variable if not provided. |