Fix images not being saved when passed as bytes

This commit is contained in:
ArsenArsen 2017-06-06 23:58:02 +02:00
parent 0b09000729
commit 35aafa0dea

View File

@ -73,6 +73,11 @@ void UploaderSingleton::upload(QPixmap *pixmap) {
}
void UploaderSingleton::upload(QByteArray img, QString format) {
QFile file(saveDir.absoluteFilePath(formatter::format(settings::settings().value("fileFormat").toString(), format.toLower())));
if (file.open(QFile::WriteOnly)) {
file.write(img);
file.close();
}
uploaders.value(uploader)->doUpload(img, format);
}