- [MongoDB](https://www.mongodb.com/home)
- [Reactjs](https://reactjs.org/)
- [Express](https://expressjs.com/)
- [Nodejs](https://nodejs.org/en/download/)
npm install
npm run client-install
npm run dev
npm run server
npm run client
image{
type: string
require:"message"
}
npm install --save multer
<form action="/stats" enctype="multipart/form-data" method="post">
<div class="form-group">
<input type="file" class="form-control-file" name="uploaded_file">
<input type="text" class="form-control" placeholder="Name" name="name">
<input type="submit" value="Upload" class="btn btn-default">
</div>
</form>
Key | Description | Note |
---|---|---|
fieldname |
Field name specified in the form |
. |
originalname |
Name of the file on the user's computer |
. |
encoding |
Encoding type of the file |
. |
mimetype |
Mime type of the file |
. |
size |
Size of the file in bytes |
. |
destination |
The folder to which the file has been saved |
.DiskStorage |
encoding |
Encoding type of the file |
. |
filename |
The name of the file within the destination |
.DiskStorage |
path |
The full path to the uploaded file |
.DiskStorage |
buffer |
A Buffer of the entire file MemoryStorage |
. |
Server runs on http://localhost:6000 and client on http://localhost:3000
Author ELHADRI Nadia