MediaManager refactoring: handle upload with mediaLoader (remove UploadManager).

This commit is contained in:
giomfo
2015-01-12 18:07:39 +01:00
parent 6baf80b501
commit f02f82b066
14 changed files with 247 additions and 292 deletions
+2 -2
View File
@@ -426,7 +426,7 @@
// Set preview until the image is loaded
self.image = previewImage;
// update the progress UI with the current info
[self updateProgressUI:loader.downloadStatsDict];
[self updateProgressUI:loader.statisticsDict];
// Add observers
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onMediaDownloadProgress:) name:kMediaDownloadProgressNotification object:nil];
@@ -449,7 +449,7 @@
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onMediaDownloadProgress:) name:kMediaDownloadProgressNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onMediaDownloadEnd:) name:kMediaDownloadDidFinishNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onMediaDownloadEnd:) name:kMediaDownloadDidFailNotification object:nil];
[MediaManager downloadMedia:imageURL mimeType:@"image/jpeg"];
[MediaManager downloadMediaFromURL:imageURL withType:@"image/jpeg"];
}
}
}