Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A proxy server that converts and uploads PDFs to smusique.com
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
res
tests
.gitignore
README.md
S3.py
app.yaml
index.html
index.yaml
main.py

README.md

A standalone Google App Engine application that uploads files to smusique.com.

API Description

GET /:

Provides an upload form supporting both PDF files and plaintext tabs/chords at up.smusique.com

POST /:

Takes form-encoded info about the work being uploaded:

Required fields:

  • title (string)
  • composer (string)
  • label (string)
  • notation (string)

XOR fields (exactly one must be specified):

  • text (string)
  • pdf (binary)
  • pdfurl (string)

Optional fields:

  • rating (int)

Test cases

Tests first! Write unit tests in QUnit for these cases:

  1. Not all required fields are specified.
  2. None of the XOR fields are specified.
  3. More than one of the XOR fields are specified.
  4. Invalid file is uploaded.
  5. Invalid URL is specified.
  6. PDF with N pages is uploaded, ensure that N expected URLs are created.
  7. Something is uploaded, ensure that a corresponding smusique database entry gets created.
Something went wrong with that request. Please try again.