Merge pull request #3 from WalshyDev/patch-1

Fix the MP4 type
This commit is contained in:
ArsenArsen 2017-04-30 11:59:50 +02:00 committed by GitHub
commit ba0fdc664e

View File

@ -19,12 +19,12 @@ void error(QString absFilePath, QString err)
CustomUploader::CustomUploader(QString absFilePath) CustomUploader::CustomUploader(QString absFilePath)
{ {
types.insert("PNG", "image/png"); // Is a list of supported formats, too types.insert("PNG", "image/png"); // This is a list of supported formats, too
types.insert("GIF", "image/gif"); types.insert("GIF", "image/gif");
types.insert("JPG", "image/jpeg"); types.insert("JPG", "image/jpeg");
types.insert("JPEG", "image/jpeg"); types.insert("JPEG", "image/jpeg");
types.insert("WEBM", "video/webm"); types.insert("WEBM", "video/webm");
types.insert("WEBM", "video/mp4"); types.insert("MP4", "video/mp4");
// Let's go // Let's go
QFile file(absFilePath); QFile file(absFilePath);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) error(absFilePath, file.errorString()); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) error(absFilePath, file.errorString());