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
3b6690bd
Commit
3b6690bd
authored
May 20, 2013
by
Felix Paul Kühne
Browse files
coding style fixes
parent
06d1cdf5
Changes
2
Hide whitespace changes
Inline
Side-by-side
AspenProject/VLCAppDelegate.m
View file @
3b6690bd
...
...
@@ -58,7 +58,7 @@
{
if
(
buttonIndex
==
1
)
{
NSArray
*
searchPaths
=
NSSearchPathForDirectoriesInDomains
(
NSDocumentDirectory
,
NSUserDomainMask
,
YES
);
NSString
*
directoryPath
=
[
searchPaths
objectAtIndex
:
0
];
NSString
*
directoryPath
=
searchPaths
[
0
];
NSURL
*
destinationURL
=
[
NSURL
URLWithString
:[
NSString
stringWithFormat
:
@"file://%@/%@"
,
directoryPath
,
_tempURL
.
lastPathComponent
]];
NSError
*
theError
;
[[
NSFileManager
defaultManager
]
copyItemAtURL
:
_tempURL
toURL
:
destinationURL
error
:&
theError
];
...
...
@@ -102,7 +102,7 @@
NSString
*
directoryPath
=
@"/Users/fkuehne/Desktop/VideoLAN docs/Clips/sel/"
;
#else
NSArray
*
searchPaths
=
NSSearchPathForDirectoriesInDomains
(
NSDocumentDirectory
,
NSUserDomainMask
,
YES
);
NSString
*
directoryPath
=
[
searchPaths
objectAtIndex
:
0
];
NSString
*
directoryPath
=
searchPaths
[
0
];
#endif
NSArray
*
foundFiles
=
[[
NSFileManager
defaultManager
]
contentsOfDirectoryAtPath
:
directoryPath
error
:
nil
];
NSMutableArray
*
filePaths
=
[
NSMutableArray
arrayWithCapacity
:[
foundFiles
count
]];
...
...
@@ -113,7 +113,7 @@
/* exclude media files from backup (QA1719) */
fileURL
=
[
NSURL
URLWithString
:[
NSString
stringWithFormat
:
@"file://%@/%@"
,
directoryPath
,
fileName
]];
[
fileURL
setResourceValue
:
[
NSNumber
numberWithBool
:
YES
]
forKey
:
NSURLIsExcludedFromBackupKey
error
:
nil
];
[
fileURL
setResourceValue
:
@
YES
forKey
:
NSURLIsExcludedFromBackupKey
error
:
nil
];
}
}
[[
MLMediaLibrary
sharedMediaLibrary
]
addFilePaths
:
filePaths
];
...
...
AspenProject/VLCHTTPUploaderController.m
View file @
3b6690bd
...
...
@@ -163,7 +163,7 @@ static const int httpLogLevel = HTTP_LOG_LEVEL_VERBOSE; // | HTTP_LOG_FLAG_TRACE
[
filesStr
appendFormat
:
@"<a href=
\"
%@
\"
> %@ </a><br/>"
,
filePath
,
[
filePath
lastPathComponent
]];
}
NSString
*
templatePath
=
[[
config
documentRoot
]
stringByAppendingPathComponent
:
@"upload.html"
];
NSDictionary
*
replacementDict
=
[
NSDictionary
dictionaryWithObject
:
filesStr
forKey
:
@"MyFiles"
]
;
NSDictionary
*
replacementDict
=
@{
@"MyFiles"
:
filesStr
}
;
// use dynamic file response to apply our links to response template
return
[[
HTTPDynamicFileResponse
alloc
]
initWithFilePath
:
templatePath
forConnection
:
self
separator
:
@"%"
replacementDictionary
:
replacementDict
];
}
...
...
@@ -204,8 +204,8 @@ static const int httpLogLevel = HTTP_LOG_LEVEL_VERBOSE; // | HTTP_LOG_FLAG_TRACE
// in this sample, we are not interested in parts, other then file parts.
// check content disposition to find out filename
MultipartMessageHeaderField
*
disposition
=
[
header
.
fields
objectForKey
:
@"Content-Disposition"
];
NSString
*
filename
=
[
[
disposition
.
params
objectForKey
:
@"filename"
]
lastPathComponent
];
MultipartMessageHeaderField
*
disposition
=
(
header
.
fields
)[
@"Content-Disposition"
];
NSString
*
filename
=
[
(
disposition
.
params
)[
@"filename"
]
lastPathComponent
];
if
(
(
nil
==
filename
)
||
[
filename
isEqualToString
:
@""
]
)
{
// it's either not a file part, or
...
...
Write
Preview
Markdown
is supported
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