aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2021-10-15 17:14:13 +0200
committermousebot <mousebot@riseup.net>2021-10-15 17:14:13 +0200
commit765da49f980673863b09a814630646c8044c96ad (patch)
treeeee81cab54d4fabbd5a51a3e501102dfab1c8d68 /lisp
parent1ccf12b34c14c3cc5c58ccf214865b3af1719d54 (diff)
FIX the filename we send to post-media-attachement
- it needs to be with full path of course!
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-toot.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 86cecfd..c00e4bf 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -446,7 +446,7 @@ will be uploaded and attached to the toot upon sending."
`(((:contents . ,(mastodon-http--read-file-as-string file))
(:content-type . ,content-type)
(:description . ,description)
- (:filename . ,(file-name-nondirectory file))))))
+ (:filename . ,file)))))
(mastodon-toot--refresh-attachments-display))
(defun mastodon-toot--upload-attached-media ()
@@ -457,9 +457,9 @@ It adds the items' ids to `mastodon-toot--media-attachment-ids', which is used t
(let* ((filename (cdr (assoc :filename attachment)))
(caption (cdr (assoc :description attachment)))
(url (concat mastodon-instance-url "/api/v1/media")))
- (message "Uploading %s..." filename)
+ (message "Uploading %s..." (file-name-nondirectory filename))
(mastodon-http--post-media-attachment url filename caption)))
- mastodon-toot--media-attachments))
+ mastodon-toot--media-attachments))
(defun mastodon-toot--refresh-attachments-display ()
"Display attachment previews in toot draft buffer."