解决ota路径不能有中文的问题。
This commit is contained in:
parent
16c7cd080c
commit
72cdbd8d98
@ -1,6 +1,7 @@
|
|||||||
#include "DeviceConnection.h"
|
#include "DeviceConnection.h"
|
||||||
#include "BoostLog.h"
|
#include "BoostLog.h"
|
||||||
#include "StringUtility.h"
|
#include "StringUtility.h"
|
||||||
|
#include <QFileInfo>
|
||||||
#include <QPointF>
|
#include <QPointF>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <WinSock2.h>
|
#include <WinSock2.h>
|
||||||
@ -362,7 +363,8 @@ void DeviceConnection::requestOta(const QString &firmware, const QString &file)
|
|||||||
request["deviceid"] = "0";
|
request["deviceid"] = "0";
|
||||||
boost::json::object data;
|
boost::json::object data;
|
||||||
data["target_linux04_firmware"] = firmware.toStdString();
|
data["target_linux04_firmware"] = firmware.toStdString();
|
||||||
data["datasize"] = std::filesystem::file_size(file.toStdString());
|
QFileInfo fileInfo(file);
|
||||||
|
data["datasize"] = fileInfo.size();
|
||||||
data["md5"] = oss.str();
|
data["md5"] = oss.str();
|
||||||
request["data"] = std::move(data);
|
request["data"] = std::move(data);
|
||||||
auto text = boost::json::serialize(request);
|
auto text = boost::json::serialize(request);
|
||||||
|
Loading…
Reference in New Issue
Block a user