Skip to content

Instantly share code, notes, and snippets.

@NuckChorris
Last active December 19, 2015 17:39
Show Gist options
  • Select an option

  • Save NuckChorris/5992880 to your computer and use it in GitHub Desktop.

Select an option

Save NuckChorris/5992880 to your computer and use it in GitHub Desktop.

Three parts: File API wrappers, jQuery/Zepto plugin for upload forms, and the batteries-included system that I'll design specifically for Pomf.

Should I extend FileList and File or wrap it? Prolly wrap it, I think. Nope, extended

File API Additions

FileList

  • uploadedSize
  • size
  • iterators
  • currently uploading (reference) getter

File

  • uploadedSize
  • URL getter

Upload

  • Dumping a FileList into a URL, essentially

jQuery/Zepto plugin

Upload events

  • uploadStart
  • uploadNewFile?
  • uploadProgress
  • uploadComplete
  • uploadResponse? response?

Connecting an upload form to another node

  • $.fn.pomf

drag and drop

  • click-and-browse
  • option to disable or enable multiple? Wait no we have HTML for that

Pomf Interface

  • Pretty preview of files (based on File/Info)
  • Upload and get URL(s?)
  • progress bars
  • Moar kawaii moeshit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment