|
@@ -840,10 +840,10 @@
|
|
NSArray *splitedUrl = [url.path componentsSeparatedByString:@"/"];
|
|
NSArray *splitedUrl = [url.path componentsSeparatedByString:@"/"];
|
|
self.fileNameUpload = [NSString stringWithFormat:@"%@",[splitedUrl objectAtIndex:([splitedUrl count]-1)]];
|
|
self.fileNameUpload = [NSString stringWithFormat:@"%@",[splitedUrl objectAtIndex:([splitedUrl count]-1)]];
|
|
|
|
|
|
- if (self.account) {
|
|
|
|
|
|
+ if (self.account && [[NSFileManager defaultManager] fileExistsAtPath:url.path]) {
|
|
|
|
|
|
- [[NSFileManager defaultManager]removeItemAtPath:[NSTemporaryDirectory() stringByAppendingString:self.fileNameUpload] error:nil];
|
|
|
|
- [[NSFileManager defaultManager]moveItemAtPath:url.path toPath:[NSTemporaryDirectory() stringByAppendingString:self.fileNameUpload] error:&error];
|
|
|
|
|
|
+ [[NSFileManager defaultManager] removeItemAtPath:[NSTemporaryDirectory() stringByAppendingString:self.fileNameUpload] error:nil];
|
|
|
|
+ [[NSFileManager defaultManager] moveItemAtPath:url.path toPath:[NSTemporaryDirectory() stringByAppendingString:self.fileNameUpload] error:&error];
|
|
|
|
|
|
if (error == nil) {
|
|
if (error == nil) {
|
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
|
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
|