23/resumable.js — pull request #184 by jmonma (2014-07-24 18:55:42+00:00)
Title: Configurable param names

Currently, Resumable.js requires servers and APIs to adhere to specific parameter names. Making these parameter names configurable greatly increases the versatility of the library, and allows consumers to structure their API according to their own constraints and naming conventions.

I've added documentation to the README. The library will still work the same out of the box, defaulting to the current names for each parameter.

Example usage:
```
var r = new Resumable({
target: '/api/photo/redeem-upload-token',
query: {upload_token:'my_token'},
paramNames: {
chunkNumber: 'chunkNumber',
totalChunks: 'chunksLength'
chunkSize: 'generalChunkSize',
currentChunkSize: 'currentChunkSize',
identifier: 'fileId',
type: 'fileType',
filename: 'fileName',
totalSize: 'fileSize',
relativePath: 'filePath'
}
});
```
The ability to get options by path is also included in the PR, allowing for:
```
$.getOpt('paramNames.chunkSize')
```