Last active
August 29, 2015 14:05
-
-
Save alecguintu/971eb66d020803b2d9c3 to your computer and use it in GitHub Desktop.
Revisions
-
alecguintu revised this gist
Sep 2, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,5 +5,5 @@ filepicker.pickMultiple picker_options, (pick_fpfiles) -> filepicker.store pick_fpfile, store_options, (store_fpfile) -> # Remove files from both fp.io and our root s3 path # Here's where the problem happens. pick_fpfile is always the last from the list of pick_fpfiles since filepicker.store is asynchronous and pick_fpfile has already changed by the time the filepicker.remove's success callback has returned filepicker.remove pick_fpfile, {policy: security.policy, signature: security.signature} -
alecguintu revised this gist
Sep 2, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,4 +4,6 @@ filepicker.pickMultiple picker_options, (pick_fpfiles) -> filepicker.store pick_fpfile, store_options, (store_fpfile) -> # Remove files from both fp.io and our root s3 path # Here's where the problem happens. pick_fpfile is always the from the list of pick_fpfiles since filepicker.store is asynchronous and pick_fpfile has already changed by the time the filepicker.remove's success callback has returned filepicker.remove pick_fpfile, {policy: security.policy, signature: security.signature} -
alecguintu created this gist
Sep 2, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ filepicker.pickMultiple picker_options, (pick_fpfiles) -> for pick_fpfile, i in pick_fpfiles sanitized_filename = sanitize_filename(pick_fpfile.filename) filepicker.store pick_fpfile, store_options, (store_fpfile) -> # Remove files from both fp.io and our root s3 path filepicker.remove pick_fpfile, {policy: security.policy, signature: security.signature}