Fix images not being saved when passed as bytes
This commit is contained in:
parent
0b09000729
commit
35aafa0dea
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user