Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kanokpit-yowaratch/nextjs-upload-file

File upload and file manager client-side by Next.js
https://github.com/kanokpit-yowaratch/nextjs-upload-file

axios eslint mui-material nextjs nextjs14 react typescript upload upload-file upload-images

Last synced: about 1 month ago
JSON representation

File upload and file manager client-side by Next.js

Awesome Lists containing this project

README

        



React

TypeScript


NextJS


Vercel

# nextjs-upload-file
Example of client-side file upload in Next.js

## Tech Stack

`React` `TypeScript` `NextJS`

## Environment configuration
Create `.env` file and set variable

```bash
# host
NEXT_PUBLIC_API="http://54.255.239.151:5000"
NEXT_PUBLIC_HOST_NAME="54.255.239.151"
NEXT_PUBLIC_PROTOCOL="http"

# host
# NEXT_PUBLIC_API="https://seer-of-human.com"
# NEXT_PUBLIC_HOST_NAME="seer-of-human.com"
# NEXT_PUBLIC_PROTOCOL="https"

# local
# NEXT_PUBLIC_API="http://localhost:3000"
# NEXT_PUBLIC_HOST_NAME="localhost"
# NEXT_PUBLIC_PROTOCOL="http"
```

## Run app
```
npm install
npm run dev
```

## Build and Deploy

```
npm run build
npm start
```

## Deploy on Vercel

Live Demo: nextjs-upload-file

API Repo: https://github.com/kanokpit-yowaratch/nestjs-upload-api
API Demo: https://seer-of-human.com