HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Does not seem to work in the latest version 2.1.10.

Upload bar displays but nothing happens.
Button says that nothing is selected but it is.

I deleted the simple uploader (which did work) and this also seemed to take out the cleditor plugin.

Comments

  • hgtonighthgtonight ∞ · New Moderator

    This is generally due to a server misconfiguration. Can you report what activity is happening on your network tools tab when you click attach file?

    In Firefox you can open the network tools tab with Ctrl + Shift + Q.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Doesn't work for me either. I just get an "Uploading" forever without any actual upload.

  • hgtonighthgtonight ∞ · New Moderator
    edited June 2015

    @ghurley said:
    Doesn't work for me either. I just get an "Uploading" forever without any actual upload.

    .

    @hgtonight said:
    This is generally due to a server misconfiguration. Can you report what activity is happening on your network tools tab when you click attach file?

    In Firefox you can open the network tools tab with Ctrl + Shift + Q.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • lettielettie New
    edited June 2015

    @hgtonight Have the same issue here. In Chrome it's giving me the following errors if this helps:

    Uncaught TypeError: Cannot read property 'Complete' of undefined   - fileupload.js?v=1.5.2:414
    
    Resource interpreted as Document but transferred with MIME type application/json: http://domain.com/post/upload/UploadAttacment_1
    

    oh ps using v 2.1.11

  • @hgtonight also the images have actually uploaded to the server as I can see them in the FileUpload folder!

  • Just found the latest version 1.8.4 so problem solved for me. May be an idea to change it or add a note to the http://vanillaforums.org/addon/784/fileupload page so that folk know that the available download 1.5.2 has been updated to 1.8.4.

  • @lettie where did you find version 1.8.4? I'd like to have it too.

  • hgtonighthgtonight ∞ · New Moderator

    @kamaleon said:
    lettie where did you find version 1.8.4? I'd like to have it too.

    https://github.com/vanilla/addons/tree/master/plugins/FileUpload

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • NuxNux New
    edited September 2015

    Thumbnail generation doesn't seem to work with 2.1.11. (Tested on two different setups.)
    I get this:

    "ImageWidth" and "ImageHeight" are both 0 in the database table GDN_Media and the ThumbPath is NULL, even though the image is 800x600.
    Apache errorlog shows:
    PHP Notice: Undefined index: Height in /var/www/html/vanilla/plugins/FileUpload/class.fileupload.plugin.php on line 852

  • NuxNux New
    edited September 2015

    Found a partial solution for the no-thumb problem with 1.8.4.

    plugins\FileUpload\class.fileupload.plugin.php contains these lines:
    $ImgParsed = Gdn_UploadImage::SaveImageAs($FileTemp, $SavePath); $ImageWidth = $ImgParsed['Width']; $ImageHeight = $ImgParsed['Height'];
    which is incorrect, Gdn_UploadImage::SaveImageAs (from core\class.uploadimage.php) doesn't populate the result with a Width and Height, but Gdn_UploadImage::ImageSize (from core\class.uploadimage.php) does at index 0 and 1.

    So a solution is to change this:
    $ImageWidth = $ImgParsed['Width']; $ImageHeight = $ImgParsed['Height'];
    to:
    //$ImageResizeResult = Gdn_UploadImage::ImageSize($SavePath); $ImageResizeResult = getimagesize($SavePath); if (count($ImageResizeResult) >= 2) { $ImageWidth = $ImageResizeResult[0]; $ImageHeight = $ImageResizeResult[1]; } else { $ImageWidth = 0; $ImageHeight = 0; }

    Although the thumb width and height aren't set correctly yet, they stay at 0.

  • NuxNux New
    edited September 2015

    Note: getimagesize / Gdn_UploadImage::ImageSize possibly causes memory leaks.

    To get thumb resolution also working, change in file FileUpload\class.fileupload.plugin.php:
    $Media = array('MediaID' => $MediaID, 'ThumbWidth' => $ThumbParsed['Width'], 'ThumbHeight' => $ThumbParsed['Height'], 'ThumbPath' => $ThumbParsed['SaveName']);
    to
    $Media = array('MediaID' => $MediaID, 'ThumbWidth' => $Width, 'ThumbHeight' => $Height, 'ThumbPath' => $ThumbParsed['SaveName']);

    This basically is the same problem: SaveImageAs should not be used, because it doesn't populate width and height.

    Btw, as a Java programmer, I find the Vanilla plugin code that I saw the last 24 hours, pretty scary. The amount of raw string values that are duplicated everywhere in code, is just asking for problems, especially when used for dictionary/map keys. This also exists in the core code and other plugins that I saw. The problem here is just an instance of this.

  • mtschirsmtschirs ✭✭✭
    edited September 2015

    @Nux schrieb:
    Btw, as a Java programmer, I find the Vanilla plugin code that I saw the last 24 hours, pretty scary.

    Run while you still can, and never look backinto the core :winky:
    Or even better: submit more issues and pull requests! We are already a small group of volunteers fighting the good fight for a more mature Vanilla, come join us :p

  • peregrineperegrine MVP
    edited September 2015

    this plugin and it maintenance is somewhat neglected.

    maybe you want to use a previous version. lol.

    not laughing at you but you are changing things back to before the last commit.

    the other laughable thing is. version 1.8.4 has so many changes from the previous 1.8.4 that version number is meaningless because no one updates the version of the plugin, when it is changed. but thats another coding curiousity.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • R_JR_J Ex-Fanboy Munich Admin

    @Nux said:
    Btw, as a Java programmer, I find the Vanilla plugin code that I saw the last 24 hours, pretty scary. The amount of raw string values that are duplicated everywhere in code, is just asking for problems, especially when used for dictionary/map keys. This also exists in the core code and other plugins that I saw. The problem here is just an instance of this.

    While being just a non-professional code monkey, I'm always very happy with Vanillas coding style since its verbosity makes it easy for me to understand it. Could you give an example of what you would improve?

  • @Nux said:
    Note: getimagesize / Gdn_UploadImage::ImageSize possibly causes memory leaks.

    Where / How?

    Btw, as a Java programmer, I find the Vanilla plugin code that I saw the last 24 hours, pretty scary. The amount of raw string values that are duplicated everywhere in code, is just asking for problems, especially when used for dictionary/map keys. This also exists in the core code and other plugins that I saw. The problem here is just an instance of this.

    Map (associative array) keys in PHP are always strings.

    PHPs strings are mutable. No need for StringBuilders etc.

Sign In or Register to comment.