Permalink
Browse files

Make it a litte easier to get the instance of the upload back. Useful…

… for tracking Individual uploads.
  • Loading branch information...
1 parent 23b3e1c commit 76b44d543d28f6cd40312358641612c310c1b28c @Me1000 committed Jun 4, 2010
Showing with 8 additions and 3 deletions.
  1. +8 −3 DCFileDropController.j
View
@@ -114,9 +114,14 @@ DCFileDropableTargets = [ ];
var files = sender.target.files;
for(var i = 0, len = files.length; i < len; i++) {
- if ([uploadManager respondsToSelector:@selector(fileUploadWithFile:uploadURL:)]) {
- [uploadManager fileUploadWithFile:files[i] uploadURL:uploadURL];
- }
+ if ([uploadManager respondsToSelector:@selector(fileUploadWithFile:uploadURL:)])
+ {
+ var upload = [uploadManager fileUploadWithFile:files[i] uploadURL:uploadURL];
+
+ if ([dropDelegate respondsToSelector:@selector(fileDropController:didBeginUpload:)])
+ [dropDelegate fileDropController:self didBeginUpload:upload];
+ }
+
}
// now clear the input

0 comments on commit 76b44d5

Please sign in to comment.