Add a tags field to the Android and desktop uploaders

Each photo card gains a free-text tags input, sent as a raw
comma-separated `tags` form field on upload. The server normalizes it
(parseTags), so the clients stay dumb — no tag parsing on-device.

- Android: PickedItem.tags + setTags; threaded through UploadQueue →
  UploadWorker → UploadClient's multipart.
- Desktop: a tags QLineEdit per PhotoItemWidget; UploadClient.upload sends
  it.
This commit is contained in:
puttaalu committed 2026-10-08 16:19:25 +02:00
1 parent a42abfab48
commit faa1e01c59
11 files changed
+43 -3

No files matched your search

+2 -1
View File
@@ -26,7 +26,7 @@ QByteArray UploadClient::authHeader() const
}
void UploadClient::upload(const QString &filePath, const QString &fileName,
const QString &caption, const QString &date)
const QString &caption, const QString &date, const QString &tags)
{
auto *file = new QFile(filePath);
if (!file->open(QIODevice::ReadOnly)) {
@@ -57,6 +57,7 @@ void UploadClient::upload(const QString &filePath, const QString &fileName,
};
multiPart->append(textPart(QStringLiteral("caption"), caption));
multiPart->append(textPart(QStringLiteral("date"), date));
multiPart->append(textPart(QStringLiteral("tags"), tags));
QNetworkRequest request(QUrl(m_base + QStringLiteral("/upload")));
request.setRawHeader("Authorization", authHeader());