Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions client/functions.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ Cloudinary =
if _.isFunction ops
callback = ops
ops = {}

if not _.isArray files
# _.isArray is returning false, when files is instance of FileList
# but we need to iterate thru FileList too, like it is an array
if !_.isArray(files) && !(files instanceof FileList)
file = files
reader = new FileReader

Expand Down Expand Up @@ -146,4 +147,4 @@ Cloudinary =

# Define helpers
Template.registerHelper "c", ->
Cloudinary._helpers
Cloudinary._helpers