mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-06 06:19:52 +08:00
GiteeImageHost: encode spaces in returned download_url
This commit is contained in:
parent
dc0c0ca849
commit
606dcef16f
@ -5,6 +5,7 @@
|
|||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
|
|
||||||
#include <utils/utils.h>
|
#include <utils/utils.h>
|
||||||
|
#include <utils/pathutils.h>
|
||||||
#include "githubimagehost.h"
|
#include "githubimagehost.h"
|
||||||
|
|
||||||
using namespace vnotex;
|
using namespace vnotex;
|
||||||
@ -146,6 +147,7 @@ QString GiteeImageHost::create(const QByteArray &p_data, const QString &p_path,
|
|||||||
if (targetUrl.isEmpty()) {
|
if (targetUrl.isEmpty()) {
|
||||||
p_msg = tr("Failed to create resource at the image host (%1) (%2) (%3).").arg(urlStr, reply.errorStr(), reply.m_data);
|
p_msg = tr("Failed to create resource at the image host (%1) (%2) (%3).").arg(urlStr, reply.errorStr(), reply.m_data);
|
||||||
} else {
|
} else {
|
||||||
|
targetUrl = PathUtils::encodeSpacesInPath(targetUrl);
|
||||||
qDebug() << "created resource" << targetUrl;
|
qDebug() << "created resource" << targetUrl;
|
||||||
}
|
}
|
||||||
return targetUrl;
|
return targetUrl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user