mirror of
https://gitlab.com/comunic/comunicmessages
synced 2025-06-20 08:55:17 +00:00
Can send image to conversations
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
#include <QDir>
|
||||
#include <QMimeDatabase>
|
||||
|
||||
#include "filesutils.h"
|
||||
|
||||
@ -17,3 +18,8 @@ bool FilesUtils::CreateDirectoryIfNotExists(const QString &path)
|
||||
|
||||
return dir.mkpath(".");
|
||||
}
|
||||
|
||||
QString FilesUtils::GetFileMimeType(const QString &filePath)
|
||||
{
|
||||
return (QMimeDatabase()).mimeTypeForFile(filePath).name();
|
||||
}
|
||||
|
@ -23,6 +23,14 @@ public:
|
||||
* FALSE else
|
||||
*/
|
||||
static bool CreateDirectoryIfNotExists(const QString &path);
|
||||
|
||||
/**
|
||||
* Get the mime type of a file
|
||||
*
|
||||
* @param filePath The path of the file to determine
|
||||
* @return File type
|
||||
*/
|
||||
static QString GetFileMimeType(const QString &filePath);
|
||||
};
|
||||
|
||||
#endif // FILESUTILS_H
|
||||
|
Reference in New Issue
Block a user