Register
Submit a solution
The challenge is finished.

Challenge Overview

Background

The file service is a layer on top of Amazon S3 used to store and retrieve files.

One of the primary uses of the file service is to support the submission service for storing and retrieving submissions and preview image files. But we can not expose the real file service due to Amazon S3 limitation.

In order to do local development and we'd like you to help us build new services, we need a mock file service that can run locally in a docker container.

The file service itself provides 3 endpoints (Apiary Specification will be provided in forum)

  • Get download URL;

  • Get upload URL;

  • Delete file;

Besides these 3 endpoints, we need to two more endingpoints that is able to upload files using the upload URL, and download files using the download URL.

Scope

Build an http server application using Node.js that exposes all endpoints described above and the two endpoints to upload and download files.

The upload url returned by the "POST /files/uploadurl" should contain query parameter like filePath, contentType etc. The upload URL returned must accept a PUT request with the body of the request being the content of the file, once invoked, the file should be saved locally to the disk.

The download url returned by "POST /files/downloadurl" should contain query parameter like filePath, contentType etc. The returned url should allow users to download the file that matches the specified parameters passed to the downloadurl call.

The file storage is file based, instead of S3, as the real file service.

  • The 3 endpoints for the file service should be mantained exactly as the API definition.
  • The 2 endpoints for real file upload and download should be able to download and upload the same file with same queries.

Execution Environment

This application must run on Docker. Provide a Dockerfile that builds a docker image that runs this application and exposes the mockup file service on port 8080.



Final Submission Guidelines

  • Complete Source Code for Mock File Service
  • Deployment Guide and Verification Steps.

ELIGIBLE EVENTS:

2016 TopCoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30053826