Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

"Failed to upload" when uploading a picture?

Hi,

The file uploader built into our forum is temperamental, many photos (vast majority) won't upload - I think it's possible down to file size but have no way to verify it for sure.

In the php.ini file the maximum size is 20M so I don't think it's that.

Here's the error we get:

Any ideas please? Thank you!

Comments

  • blizeHblizeH ✭✭

    Also when it does insert, it's tiny and a thumbnail you have to click on, not a nice inline image like that ^

  • Did you try watching it as you upload it, with developer browser console open? Click the Network tabs and the Console tabs and see what's happening during the upload.

    As I'm fairly new on this forum, I can only give answers as to what works on most scripts. In a lot of cases, folder permissions come into play when things won't upload. JS conflicts can play a part (though I need more time playing with Vanilla to see how it uploads). I don't have a file uploader on my forum so it'll be a little harder to test things as we don't allow it for security reasons.

    Is it in the advanced editor? Is it a plugin? Did you make something?

    Perhaps one of the gurus here will know exactly what you are using. Til then, I'm just trying to help you troubleshoot.

  • blizeHblizeH ✭✭

    Thank you very much! I'm on mobile right now but I'll check as soon as I can get on a PC.

    I am using the built in editor (same upload photo feature as this forum too)

    Based on more testing I'm 100% sure it's due to file sizes. Images below 2mb seem to upload fine but nothing bigger.

  • blizeHblizeH ✭✭

    Thank you so much for the detailed reply! :)

    I've just upgraded to the latest version - 2.2.1 - so I think I've posted this in the wrong category but I can't figure out how to change it.

    In my php.ini file I have:

    post_max_size = 40M
    upload_max_filesize = 40M
    

    And I've just updated the following:

    memory_limit = 128M
    

    And now... I don't want to jinx it, but I think changing the memory limit has worked! Woooo :D Thank you so much

  • blizeHblizeH ✭✭

    It's still displayed like this by the way:

    Is it just a case of waiting for a stable 2.3 release, or is there something I can change in the mean time?

  • @blizeH said:
    It's still displayed like this by the way:

    Is it just a case of waiting for a stable 2.3 release, or is there something I can change in the mean time?

    To fix the issue in vanilla 2.2.1, The easiest for you based on your questions and responses is

    change this line 1210 in plugins/editor/js/editor.js from

     var editorWidth = $(editor.textarea.element).width();
    
     to
    
     var editorWidth = $(this).find('.BodyBox').width();
    

    You also need to be aware of this if you want things to function properly.

    regarding your Input Formatters in config.php

    Make sure if you want the image automatically inserted use one of these formats ('Wysiwyg', 'Html', 'Markdown', 'BBCode'). You CAN NOT use Text ot TextEx as the formats for the Desktop because it will not insert the image

    $Configuration['Garden']['InputFormatter']

    and Make sure if you want the image automatically inserted use one of these formats ('Wysiwyg', 'Html', 'Markdown', 'BBCode'). You CAN NOT use Text ot TextEx as the formats for the Mobile because it will not insert the image

    $Configuration['Garden']['MobileInputFormatter']

    Both of these setting are available from the Advanced Editor Settings page thru the dropdown boxes.

    Make sure you reload the browser and anything that might cache your js, so the changes you make to the js will be reflected.

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

Sign In or Register to comment.