Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kratos-respawned/uploadify
File upload service for all your js apps
https://github.com/kratos-respawned/uploadify
drizzle-orm nextauth nextjs postgresql saas typescript
Last synced: 22 days ago
JSON representation
File upload service for all your js apps
- Host: GitHub
- URL: https://github.com/kratos-respawned/uploadify
- Owner: kratos-respawned
- Created: 2023-09-27T18:35:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-28T08:41:29.000Z (about 1 year ago)
- Last Synced: 2024-11-09T21:42:02.927Z (3 months ago)
- Topics: drizzle-orm, nextauth, nextjs, postgresql, saas, typescript
- Language: TypeScript
- Homepage: https://uploadify.itsgaurav.co
- Size: 1.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Uploadify
Uploadify is SAAS that allows you to easily upload files to the cloud. This README will guide you through the process of setting up and using Uploadify.
## Getting Started
1. Create an account on [uploadify.itsgaurav.co](https://uploadify.itsgaurav.co/) to get your client key and secret.
2. Create a `.env` file in the root directory of your project and add your client key and secret in it:
```
API_KEY=your_api_key_here
SECRET=your_secret_here
```
3. Install the `younicorn_uploadify` package:```
npm install younicorn_uploadify
yarn add younicorn_uploadify
pnpm i younicorn_uploadify
```4. Create an instance of the `uploadify` class:
```
import uploadify from "younicorn_uploadify"
const instance = new uploadify(API_KEY, SECRET)
```
5. Use the `upload` method to upload a file:
```
const {response, error} = await instance.upload(file)
```## API
### `uploadify(API_KEY, SECRET)`
Creates a new instance of the `uploadify` class.
- `API_KEY` - Your Uploadify API key.
- `SECRET` - Your Uploadify API secret.### `upload(file)`
Uploads a file to the cloud.
- `file` - The file to upload.
Returns an object containing the uploaded file's data and any errors that occurred during the upload.
- `response` - The uploaded file's data.
```
response={
url: string;
fileName: string;
}
```- `error` - Any errors that occurred during the upload.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.