Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
bd1684b8
Commit
bd1684b8
authored
May 20, 2013
by
Felix Paul Kühne
Browse files
http upload: fix upload location so it's actually working now
parent
13496d90
Changes
2
Hide whitespace changes
Inline
Side-by-side
AspenProject/VLCAppDelegate.h
View file @
bd1684b8
...
...
@@ -14,6 +14,8 @@
NSURL
*
_tempURL
;
}
-
(
void
)
updateMediaList
;
@property
(
nonatomic
,
readonly
)
VLCPlaylistViewController
*
playlistViewController
;
@property
(
nonatomic
,
strong
)
UIWindow
*
window
;
...
...
AspenProject/VLCHTTPUploaderController.m
View file @
bd1684b8
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment