Statistics
| Branch: | Tag: | Revision:

mongoose / examples / restful_server_s3 @ eaef5bd1

Name Size Revision Age Author Comment
Makefile 65 Bytes eaef5bd1 almost 5 years Alexander Alashkin Revert "Stop publish examples to mongoose repo"...
README.md 1.06 KB eaef5bd1 almost 5 years Alexander Alashkin Revert "Stop publish examples to mongoose repo"...
index.html 2.92 KB eaef5bd1 almost 5 years Alexander Alashkin Revert "Stop publish examples to mongoose repo"...
restful_server_s3.c 5.72 KB eaef5bd1 almost 5 years Alexander Alashkin Revert "Stop publish examples to mongoose repo"...

Latest revisions

# Date Author Comment
eaef5bd1 02/06/2017 02:08 PM Alexander Alashkin

Revert "Stop publish examples to mongoose repo"

This reverts commit 1a17e17c462bdd4e1d26d8742f8b7087273e04c2.

PUBLISHED_FROM=80028de308c9a021955d1425d2bfee8feb85f193

551f393d 02/03/2017 10:17 AM Alexander Alashkin

Remove examples

7dd1004b 04/06/2016 07:25 AM Alexander Alashkin

Fix mg examples

PUBLISHED_FROM=dec3ce8a13ff588637601cdb03dbe6196468ba4a

df311203 03/10/2016 12:11 PM Alexander Alashkin

Fix mongoose/examples compilation with mingw

PUBLISHED_FROM=46800f43ba03082cc589d70e6118d754f4cdc9d0
e1dd3f06 09/21/2015 02:19 PM Sergey Lyubka

Rename Mongoose constants: NS_ -> MG_, NSF_ -> MG_F_

PUBLISHED_FROM=c9cc54df1883aa17606de2b1ffb30f0cd687d037
32ab35f6 09/21/2015 02:19 PM Deomid Ryabkov

Rename hmac_sha1 -> cs_hmac_sha1

PUBLISHED_FROM=3d4fbd8192d04add406e304b113ce5ec0b1c1165
8927c9d2 09/08/2015 12:34 PM Marko Mikulicic

Merge dev branch code named Fossa as next stable Mongoose

View revisions

README


RESTful server with Amazon S3 upload example

This example demonstrates how Mongoose could be used to implement a RESTful service that uses another RESTful service to handle it's own API call. This example takes form data and uploads it as a file to Amazon S3.

Prerequisites

  • Amazon S3 account security credentials: Access Key ID and Secret Access Key ID. Get them from the Amazon IAM console.
  • Amazon S3 bucket.

Building and running the example

$ git clone https://github.com/cesanta/mongoose.git
$ cd mongoose/examples/restful_server_s3
$ make
$ ./restful_server_s3 -a ACCESS_KEY_ID -s SECRET_ACCESS_KEY_ID
Starting RESTful server on port 8000

Then, open a browser on http://localhost:8000

Note: If you're getting a Temporary Redirect error, look what is the Endpoint value is. It's likely that you have something like BUCKET_NAME.S3_ZONE.amazonaws.com. Change the Host field to S3_ZONE.amazonaws.com and retry.

Screenshot

Also available in: Atom