feat: add channel attachment upload and retrieval with dedicated model, mapper, service, and view

This commit is contained in:
2025-05-10 18:38:32 +00:00
parent bb56df9183
commit 8fc126d45a
11 changed files with 129 additions and 4 deletions
+5
View File
@@ -47,6 +47,11 @@
document.querySelector("upload-button").addEventListener("upload",function(e){
getInputField().focus();
})
document.querySelector("upload-button").addEventListener("uploaded",function(e){
e.detail.files.forEach((file)=>{
app.rpc.sendMessage(channelUid,`![${file.name}](/channel/attachment/${file.relative_url})`)
})
})
textBox.addEventListener("paste", async (e) => {
try {
const clipboardItems = await navigator.clipboard.read();