Create Profile\Attachment\Upload module class

- Add missing response type in AjaxUpload initializition
This commit is contained in:
Hypolite Petovan 2022-10-30 13:36:08 -04:00
parent 6bf65eb515
commit 969b4f991e
5 changed files with 185 additions and 13 deletions

View file

@ -123,8 +123,9 @@ var FileBrowser = {
if ($("#upload-file").length)
var file_uploader = new window.AjaxUpload(
'upload-file',
{ action: 'wall_attach/'+FileBrowser.nickname+'?response=json',
{ action: 'profile/' + FileBrowser.nickname + '/attachment/upload?response=json',
name: 'userfile',
responseType: 'json',
onSubmit: function(file,ext) { $('#profile-rotator').show(); $(".error").addClass('hidden'); },
onComplete: function(file,response) {
if (response['error']!= undefined) {