Skip to content

Commit

Permalink
[K5.1] Upload avatar fails when using nginx server (#6893)
Browse files Browse the repository at this point in the history
  • Loading branch information
xillibit committed Aug 2, 2020
1 parent 65eae50 commit 2a5db26
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jQuery(function ($) {
});

$('#fileupload').fileupload({
url: 'index.php?option=com_kunena&view=user&task=upload&format=json',
url: Joomla.getOptions('com_kunena.avatar_upload_url'),
dataType: 'json',
autoUpload: true,
// Enable image resizing, except for Android and Opera,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
$this->addScriptOptions('com_kunena.avatar_remove_url', KunenaRoute::_('index.php?option=com_kunena&view=user&task=removeavatar&format=json&' . Session::getFormToken() . '=1', false));
$this->addScriptOptions('com_kunena.avatar_preload_url', KunenaRoute::_('index.php?option=com_kunena&view=user&task=loadavatar&format=json&' . Session::getFormToken() . '=1', false));
$this->addScriptOptions('com_kunena.avatar_delete', KunenaIcons::delete());
$this->addScriptOptions('com_kunena.avatar_upload_url', JUri::root(true) . '/index.php?option=com_kunena&view=user&task=upload&format=json');
?>
<h3>
<?php echo $this->headerText; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jQuery(function ($) {
});

$('#fileupload').fileupload({
url: 'index.php?option=com_kunena&view=user&task=upload&format=json',
url: Joomla.getOptions('com_kunena.avatar_upload_url'),
dataType: 'json',
autoUpload: true,
// Enable image resizing, except for Android and Opera,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
$this->addScriptOptions('com_kunena.avatar_remove_url', KunenaRoute::_('index.php?option=com_kunena&view=user&task=removeavatar&format=json&' . Session::getFormToken() . '=1', false));
$this->addScriptOptions('com_kunena.avatar_preload_url', KunenaRoute::_('index.php?option=com_kunena&view=user&task=loadavatar&format=json&' . Session::getFormToken() . '=1', false));
$this->addScriptOptions('com_kunena.avatar_delete', KunenaIcons::delete());
$this->addScriptOptions('com_kunena.avatar_upload_url', JUri::root(true) . '/index.php?option=com_kunena&view=user&task=upload&format=json');
?>
<h3>
<?php echo $this->headerText; ?>
Expand Down

0 comments on commit 2a5db26

Please sign in to comment.