close
Skip to content

torrens/nodeFileUploader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nodeFileUploader

This is a simple node Express sample showing how easy it to write a webserver that can handle file uploads in Node.

#Installation

Install node.js and npm. https://nodejs.org/download/

Then at the terminal.

npm install

#Start Server

node app.js

#Upload a file using Postman

Postman is a REST client for chrome which is the easiest way to test an HTTP endpoint.

Here are the settings needed to upload a file to the nodeFileUploader. Postman Settings

#Upload a file using HTTPie

HTTPie is a cross platform HTTP client, which can be downloaded from here. https://github.com/jakubroztocil/httpie

Upload a text file http -f POST http://localhost:3000/mark/password file@testText.txt

Upload a binary file http -f POST http://localhost:3000/mark/password file@testImage.png

Upload with a failed authentication http -f POST http://localhost:3000/david/password1 file@testImage.png

#Upload a file using CURL If you are using Yosemite on mac do this first echo '--ipv4' >> ~/.curlrc

curl -i -F "file=@testImage.png" http://localhost:3000/mark/password

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors