relative path upload fixes #2403

This commit is contained in:
barisusakli
2014-11-13 13:00:36 -05:00
parent 7f5617bc74
commit b3544f644a
3 changed files with 4 additions and 4 deletions

View File

@@ -213,7 +213,7 @@ define('composer/uploads', ['composer/preview'], function(preview) {
text = textarea.val(),
uploadForm = postContainer.find('#fileForm');
uploadForm.attr('action', params.route);
uploadForm.attr('action', config.relative_path + params.route);
for(var i = 0; i < files.length; ++i) {
var isImage = files[i].type.match(/image./);
@@ -288,7 +288,7 @@ define('composer/uploads', ['composer/preview'], function(preview) {
spinner = postContainer.find('.topic-thumb-spinner'),
thumbForm = postContainer.find('#thumbForm');
thumbForm.attr('action', params.route);
thumbForm.attr('action', config.relative_path + params.route);
thumbForm.off('submit').submit(function() {
var csrf = $('#csrf').attr('data-csrf');