1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How can I fix attachment upload error in custom addon

Discussion in 'XenForo Development Discussions' started by lsxforo, Feb 16, 2016.

  1. lsxforo

    lsxforo Member


    While I dare try to code mine custom addon I have to request your help.
    Please understand this is my first addon and I am new a bit.

    I looked at some addon for attachment handling, and I try to add it to my class too.

    In my case, there is output that contains "403 error" in console.log when attach button was loaded.

    I have created some method at these classes;


    and I used default attachment editor templates.

    console.log error shows;

    Queued file images12.jpg (45658 bytes). attachment_editor.js:13:560
    XenForo.activate(%o) [object Object] xenforo.js:220
    Attachments changed, total files: 1, images: 1 attachment_editor.js:13:30
    Uploading images12.jpg attachment_editor.js:14:2
    http://localhost/happyhome/attachments/do-upload.json [HTTP/1.1 403 Forbidden 78ms]
    Uploaded 45658/45658 bytes. attachment_editor.js:15:38
    Object { code: -200, message: "HTTP 오류", file: Object, response: "{"error":["You do not have permissi…", status: 403, responseHeaders: "Date: Tue, 16 Feb 2016 08:17:45 GMT…" } attachment_editor.js:16:2
    AttachmentUploadError:  Object { type: "AttachmentUploadError", timeStamp: 1455610665797, jQuery111009262114111006796: true, file: Object, errorCode: -200, message: "HTTP 오류", ajaxData: Object, swfUpload: null, plupload: Object, isTrigger: 3, 8 더 있음… }
    The permission is validated, and mod_security was not loaded in apache module.

    What is wrong in my trial?
    I need your guide and comment about this error.

    Yours. I appreciate in advanced.

Share This Page