Drag and Drop support for File attachments

This commit is contained in:
michael starke
2013-08-02 00:10:08 +02:00
parent 560d9ce941
commit 9d22494bf4
5 changed files with 90 additions and 0 deletions

View File

@@ -20,6 +20,10 @@
- (void)addAttachment:(NSURL *)location toEntry:(KdbEntry *)anEntry {
NSError *error = nil;
NSDictionary *resourceKeys = [location resourceValuesForKeys:@[NSURLIsDirectoryKey] error:&error];
if([resourceKeys[ NSURLIsDirectoryKey ] boolValue] == YES ) {
return; // We do not add whol directories
}
NSString *fileName = [location lastPathComponent];
if([anEntry isKindOfClass:[Kdb3Entry class]]) {
Kdb3Entry *entry = (Kdb3Entry *)anEntry;