mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 08:56:10 +00:00
Insert a link with a pretty file name when uploading a file.
(imported from commit 1367004792e145afa19a02417fb564ad3662f576)
This commit is contained in:
@@ -522,8 +522,10 @@ $(function () {
|
|||||||
if (response.uri === undefined) {
|
if (response.uri === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var textbox = $("#new_message_content");
|
var textbox = $("#new_message_content"),
|
||||||
textbox.val(textbox.val() + " " + response.uri);
|
split_uri = response.uri.split("/"),
|
||||||
|
filename = split_uri[split_uri.length - 1];
|
||||||
|
textbox.val(textbox.val() + "[" + filename + "](" + response.uri + ")" + " ");
|
||||||
$("#new_message_content").trigger("autosize");
|
$("#new_message_content").trigger("autosize");
|
||||||
$("#compose-send-button").removeAttr("disabled");
|
$("#compose-send-button").removeAttr("disabled");
|
||||||
$("#send-status").removeClass("alert-info")
|
$("#send-status").removeClass("alert-info")
|
||||||
|
|||||||
Reference in New Issue
Block a user