Fix for reply to user avatar and picture uploading not working when editing post with discourse running in a prefix

This commit is contained in:
Wojciech Kocjan
2013-04-05 12:46:14 +02:00
parent 5273657537
commit 0481fbae8c
3 changed files with 3 additions and 3 deletions
@@ -53,7 +53,7 @@ Discourse.Utilities = {
if (template) {
return template.replace(/\{size\}/g, rawSize);
}
return "/users/" + (username.toLowerCase()) + "/avatar/" + rawSize + "?__ws=" + (encodeURIComponent(Discourse.BaseUrl || ""));
return Discourse.getURL("/users/") + (username.toLowerCase()) + "/avatar/" + rawSize + "?__ws=" + (encodeURIComponent(Discourse.BaseUrl || ""));
},
avatarImg: function(options) {
@@ -270,7 +270,7 @@ Discourse.ComposerView = Discourse.View.extend({
$uploadTarget.off();
$uploadTarget.fileupload({
url: '/uploads',
url: Discourse.getURL('/uploads'),
dataType: 'json',
timeout: 20000,
formData: { topic_id: 1234 }