Skip to content

Commit

Permalink
url safe filename before upload
Browse files Browse the repository at this point in the history
  • Loading branch information
baugarten committed Jun 13, 2015
1 parent 28e36e2 commit 71e16e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/javascripts/s3_direct_upload.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ $.fn.S3Uploader = (options) ->
content.filepath = $uploadForm.find('input[name=key]').val().replace('/${filename}', '')
content.url = domain + content.filepath + '/' + encodeURIComponent(file.name)

content.filename = file.name
content.filename = file.names.replace(/[^a-z0-9]/gi, '_').toLowerCase()
content.filesize = file.size if 'size' of file
content.lastModifiedDate = file.lastModifiedDate if 'lastModifiedDate' of file
content.filetype = file.type if 'type' of file
Expand Down

0 comments on commit 71e16e3

Please sign in to comment.