mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 08:03:50 +02:00
Delete video files in temp folder when the upload is done or has failed
This commit is contained in:
@@ -335,7 +335,7 @@ typedef enum : NSUInteger
|
||||
@param selectedVideo an AVAsset that represents the video to send.
|
||||
@param isPhotoLibraryAsset tell whether the video has been selected from user's photos library.
|
||||
*/
|
||||
- (void)sendSelectedVideoAsset:(AVAsset*)selectedVideo isPhotoLibraryAsset:(BOOL)isPhotoLibraryAsset;
|
||||
- (BOOL)sendSelectedVideoAsset:(AVAsset*)selectedVideo isPhotoLibraryAsset:(BOOL)isPhotoLibraryAsset;
|
||||
|
||||
/**
|
||||
Handle multiple media attachments according to the compression mode.
|
||||
|
||||
@@ -779,7 +779,8 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
|
||||
[self sendSelectedVideoAsset:videoAsset isPhotoLibraryAsset:isPhotoLibraryAsset];
|
||||
}
|
||||
|
||||
- (void)sendSelectedVideoAsset:(AVAsset*)selectedVideo isPhotoLibraryAsset:(BOOL)isPhotoLibraryAsset
|
||||
// bwi: added boolean return value to inform the caller if the asset could be sent to the content repository
|
||||
- (BOOL)sendSelectedVideoAsset:(AVAsset*)selectedVideo isPhotoLibraryAsset:(BOOL)isPhotoLibraryAsset
|
||||
{
|
||||
// Check condition before saving this media in user's library
|
||||
if (_enableAutoSaving && !isPhotoLibraryAsset)
|
||||
@@ -799,7 +800,7 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
|
||||
{
|
||||
if (![selectedVideo isKindOfClass:[AVURLAsset class]]) {
|
||||
MXLogDebug(@"sendSelectedVideoAsset failed because asset is not an AVURLAsset");
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Retrieve the video frame at 1 sec to define the video thumbnail
|
||||
@@ -813,13 +814,16 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
|
||||
CFRelease(imageRef);
|
||||
|
||||
[self.delegate roomInputToolbarView:self sendVideoAsset:selectedVideo withThumbnail:videoThumbnail];
|
||||
return true;
|
||||
} else {
|
||||
MXLogDebug(@"sendSelectedVideoAsset failed because imageRef is nil");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MXLogDebug(@"[RoomInputToolbarView] Attach video is not supported");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user