|
@@ -7,6 +7,7 @@
|
|
|
//
|
|
|
|
|
|
#import "VLCHTTPUploaderController.h"
|
|
|
+#import "VLCAppDelegate.h"
|
|
|
|
|
|
#import "DDLog.h"
|
|
|
#import "DDTTYLogger.h"
|
|
@@ -202,7 +203,10 @@ static const int httpLogLevel = HTTP_LOG_LEVEL_VERBOSE; // | HTTP_LOG_FLAG_TRACE
|
|
|
// an empty form sent. we won't handle it.
|
|
|
return;
|
|
|
}
|
|
|
- NSString* uploadDirPath = [[config documentRoot] stringByAppendingPathComponent:@"upload"];
|
|
|
+
|
|
|
+ // create the path where to store the media
|
|
|
+ NSArray *searchPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
|
|
+ NSString* uploadDirPath = searchPaths[0];
|
|
|
|
|
|
BOOL isDir = YES;
|
|
|
if (![[NSFileManager defaultManager]fileExistsAtPath:uploadDirPath isDirectory:&isDir ]) {
|
|
@@ -239,6 +243,10 @@ static const int httpLogLevel = HTTP_LOG_LEVEL_VERBOSE; // | HTTP_LOG_FLAG_TRACE
|
|
|
// as the file part is over, we close the file.
|
|
|
[storeFile closeFile];
|
|
|
storeFile = nil;
|
|
|
+
|
|
|
+ /* update media library when file upload was completed */
|
|
|
+ VLCAppDelegate* appDelegate = [UIApplication sharedApplication].delegate;
|
|
|
+ [appDelegate updateMediaList];
|
|
|
}
|
|
|
|
|
|
@end
|