Make sure we don't upload empty images
This commit is contained in:
parent
f04aa81b9f
commit
40d9edd7a8
@ -31,7 +31,7 @@ RecordingFormats::RecordingFormats(formats::Recording f) {
|
||||
delete enc;
|
||||
if (interrupt) {
|
||||
tmpDir.removeRecursively();
|
||||
return;
|
||||
return QByteArray();
|
||||
}
|
||||
QFile res(path);
|
||||
if (!res.open(QFile::ReadOnly)) {
|
||||
|
@ -73,6 +73,7 @@ void UploaderSingleton::upload(QPixmap *pixmap) {
|
||||
}
|
||||
|
||||
void UploaderSingleton::upload(QByteArray img, QString format) {
|
||||
if (img.isEmpty()) return;
|
||||
QFile file(saveDir.absoluteFilePath(formatter::format(settings::settings().value("fileFormat").toString(), format.toLower())));
|
||||
if (file.open(QFile::WriteOnly)) {
|
||||
file.write(img);
|
||||
|
Loading…
Reference in New Issue
Block a user