code: function (req, res) {
                  var s3 = new AWS.S3(),
                      bucket = req.params.name,
                      key = getFullKeyParam(req.params, req.route),
                      contentType = mime.lookup(key),
                      params = {
                          Bucket: bucket,
                          Key: key,
                          // Pipe the file through the request body
                          Body: req
                      },
                      trackUploadProgress = function (evt) {
                          // This function is called each time a chunk of the file is uploaded
                          //console.log(evt);
                      },
                      handleUploadComplete = function (err, data) {
                          if (err) {
                              res.status(500).send(err);
                          } else {
                              // Add s3g link to reference the resource                            
                              data.links = [{
                                  rel: 'self',
                                  href: getOriginalink(req)
                              }];
                              
                              res.json(data);
                          }
                      };
  
  				// Set content type for object if we have one
                  if (contentType) {
                      params.ContentType = contentType;
                  }
  
                  s3.upload(params).on('httpUploadProgress', trackUploadProgress).send(handleUploadComplete);
              }
docs: Set strict routing that /buckets/test/abc is not the same as /buckets/test/abc/ adding the slash at the end denotes creating a folder and not a file