File uploading with can.Component and jQuery-fi...

File uploading with can.Component and jQuery-file-upload

Mihael Konjević

June 27, 2014

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

6 slides
  1. File Uploading • Use different endpoints for uploads and file

    metadata • Makes it easy to upload directly to a different server via iframe (eg. S3) File upload endpoint File metadata endpoint File Uploader (Component) Upload file Get Metadata Save Metadata
  2. • If file is currently uploaded cancel the action •

    If file is already uploaded delete it • UI is the same for both actions Cancelling the upload Cancel Upload Delete File
  3. Events are your friends • Use events to integrate jQuery-file-upload

    • `events` object in can.Component is a can.Control instance • Update progress of the file upload • Know when upload is done • When `file` is removed from the `scope.files` list, cancel the upload or delete the file

More Decks by Mihael Konjević

Other Decks in Technology