File Metadata Microservice

FreeCodeCamp Backend Challenge 5

Full-stack microservice (really basic frontend in Pug/HTML) that takes a FormData object from a file upload form and returns the file size in bytes as part of a JSON response.

User Stories

  • I can submit a FormData object that includes a file upload
  • When I submit something, I will receive the file size in bytes within the JSON response


// upload page
exports.upload = function (req, res) {

// File Metadata Microservice - file upload result
exports.result =  function (req, res) {
    'filename': req.file.originalname,
    'size': req.file.size


View this code live on Heroku