A basic REST API to upload and manage files. First a file is uploaded to a local server directory, and then uploaded to S3. A GUI form has also been provided to make uploading easier.
To setup, please use the following instructions:
- Git clone this repo!
- Edit file_upload/app/config/config.local.json and specify your AWS credentials + test bucket name.
- Navigate to the file_uploads root directory and run
npm install --saveto get all the dependencies - Navigate to the 'app' folder and run
node server.js(the upload directory should automatically appear after you do this) - Open your browser and go to http://localhost:3000
- Select an image, hit upload. This will submit a POST request to http://localhost:3000/v1/images
- You will be redirected to the JSON response of the API query, which will contain the public url of the image. Repeat this operation as many times as you like with different images.
- Refresh the results page (i.e. do a GET on http://localhost:3000/v1/images) to see a list of all images uploaded to that bucket.
That is all! Other operations like individual GET, metadata, DELETE operations etc will all be added in later.....