> do you have test for this code?

Yeap. See [upload_spec.coffee#L24](https://github.com/edx/edx-platform/blob/anton/download-handout/cms/static/coffee/spec/models/upload_spec.coffee#L24) and [upload_spec.coffee#L19](https://github.com/edx/edx-platform/blob/anton/download-handout/cms/static/coffee/spec/models/upload_spec.coffee#L19) .