mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 01:16:19 +00:00
Show paste file name when pasting
(imported from commit 8648ef26085f5f01fbc1ddf85b2de1ad1bab2967)
This commit is contained in:
@@ -526,7 +526,13 @@ $(function () {
|
||||
var textbox = $("#new_message_content"),
|
||||
split_uri = response.uri.split("/"),
|
||||
filename = split_uri[split_uri.length - 1];
|
||||
if (i === -1) {
|
||||
// This is a paste, so there's no filename. Show the image directly
|
||||
textbox.val(textbox.val() + "[pasted image](" + response.uri + ") ");
|
||||
} else {
|
||||
// This is a dropped file, so make the filename a link to the image
|
||||
textbox.val(textbox.val() + "[" + filename + "](" + response.uri + ")" + " ");
|
||||
}
|
||||
$("#new_message_content").trigger("autosize");
|
||||
$("#compose-send-button").removeAttr("disabled");
|
||||
$("#send-status").removeClass("alert-info")
|
||||
|
||||
Reference in New Issue
Block a user