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.

A mod to File Upload version 1.8.4 to make it work with vanilla 2.1.5

peregrineperegrine MVP
edited November 2014 in Vanilla 2.0 - 2.8

make sure you already have version 1.8.4 downloaded from gitthub and copy the FileUpload plugin into your plugins folder.

Do not enable the plugin yet.

you can download the addons from github here. File Upload 1.8.4 is in the Master (at least now it is)

https://github.com/vanilla/addons

make sure you already have version 1.8.4 of FileUpload downloaded from gitthub and copy the FileUpload plugin into your plugins folder.

download the attached zip file, unzip and copy over the existing class.fileupload.plugin.php

it worked for me as far as allowing plugin to be enabled and for uploading and downloading and deleting attachments.

also you can add info here:

http://vanillaforums.org/discussion/26703/plugins-themes-that-work-and-dont-work-in-vanilla-2-1/p1

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

Comments

  • Excellent! Thanks.

    But I do have one question. With version 1.7.1 I was able to edit it so that it used the file name as part of its "random" naming for the file. This at least made the file name kind of make sense when the file was downloaded. I do not see those same lines of code in this version. Is there a way to make it so that the first few characters are random and then include the file name? Kind of like this...

    462afc3u.file_name_goes_here.jpg

    Even better would be if there were a way to translate the uploaded random name and rename it to the original file name when downloaded.

  • peregrineperegrine MVP
    edited November 2014

    is there a way to make it so that the first few characters are random and then include the file name? Kind of like this...

    see for ideas.

    look around line 835 in class.fileupload.plugin.php version 1.8.4.1 and try something similar.

    http://vanillaforums.org/discussion/27815/downloading-attachments-generates-junk-file-names-rather-than-the-original-files-name

    it may work for you.

    add here if you already haven't done so....
    http://vanillaforums.org/discussion/26703/plugins-themes-that-work-and-dont-work-in-vanilla-2-1/p1

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

  • Thanks! For some reason when I searched the file it did not find the "Build filename" in the search.

  • peregrineperegrine MVP
    edited November 2014

    @pcchenard said:
    Thanks! For some reason when I searched the file it did not find the "Build filename" in the search.

    if you change it you might add your snippet of code modification in case anyone wants to use it. So people don't ask later "how did you do it".

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

  • The other discussion you linked is how I edited it last time. I'll probably just do that again. Thanks again.

  • @peregrine‌ FYI: today: 12/10/2014

    Followed all as per above (https://github.com/vanilla/addons --make sure you already have version 1.8.4 of FileUpload downloaded from gitthub and copy the FileUpload plugin into your plugins folder.) My plugin area now says for FileUpload: Version 1.5.2|Requires: Vanilla Version 2.0.9|By Tim Gunter

    I'll go back and put back in the 1.8.4.1 I'd downloaded elsewhere before... was making double-sure I had the latest version via the hub and then copying over the class.fileupload.plugin.php that currently runs the real forum.

  • peregrineperegrine MVP
    edited December 2014

    @persistent said:
    peregrine‌ FYI: today: 12/10/2014

    Followed all as per above (https://github.com/vanilla/addons --make sure you already have version 1.8.4 of FileUpload downloaded from gitthub and copy the FileUpload plugin into your plugins folder.) My plugin area now says for FileUpload: Version 1.5.2|Requires: Vanilla Version 2.0.9|By Tim Gunter

    I'll go back and put back in the 1.8.4.1 I'd downloaded elsewhere before... was making double-sure I had the latest version via the hub and then copying over the class.fileupload.plugin.php that currently runs the real forum.

    obviously you didn't do something correctly. :)

    I can't be responsible for you incorrectly copying files, can I ????

    https://github.com/vanilla/addons/archive/master.zip

    because github has 1.8.4

    https://github.com/vanilla/addons/blob/master/plugins/FileUpload/class.fileupload.plugin.php#L28

    and if you did it correctly you would not see fileupload 1.5.2

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

  • I will try this new link you gave me. The uppermost link was done correctly on my end. Will try again to be back at square one.

    But you are RIGHT - you cannot be responsible for people not correctly copying files.

  • Back to square 1! THANK YOU.

  • @peregrine said:
    download the attached zip file, unzip and

    --> copy over the existing class.fileupload.plugin.php

    This is where the 1.5.2 is coming from. I had already "copied over" the existing file without changes, and the current, existing, functioning in real site php file has old version info.

    Did I do what you mean for us to do?

    My interpretation is to use the old file from the older installation I am upgrading.
    I am surmising the old file has uploaded file tracking info in it to keep existing filing system straight. ?

  • peregrineperegrine MVP
    edited December 2014

    0 disable fileuploads plugin via your dashboard if not already done so
    1 identify where vanilla is installed on your server
    2 you found it. proceed to step 3
    3 look for the plugins folder
    4 you found it. proceed to step 5
    5 delete Fileupload folder entirely if it exists
    6 download https://github.com/vanilla/addons/archive/master.zip to your pc.
    7 unzip it.
    8 locate the Fileupload folder in the zip file you just extracted and copy (upload) the Fileupload folder to the plugins folder on your server
    9 if you followed the steps.
    10 go to your dashboard plugins section and see if version for fileupload is 1.8.4
    11 if so, download https://us.v-cdn.net/5018160/uploads/editor/z7/2inse0x0dozz.zip to your pc.
    12 unzip the file from step 11, it will contain class.fileupload.plugin.php which is the mod I made.
    13 copy (upload) the file from step 12 to plugins/Fileupload on your server
    14 take a rest, then continue to step 15.
    15 go to your dashboard plugin and see if it says 1.8.4.1
    16 if so, you followed the instructions correctly and you can enable the plugin.
    17 if not, get a nap, and re-read instructions in the morning after 3 cups of strong coffee and attempt again.

    or if that is too many steps just follow the instructions in the opening post.

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

  • :) thanks, peregrine. All of that done last week. I'll not ask why instructions say, "copy over the existing class.fileupload.plugin.php" - probably means let it overwrite existing old file with the new in the github I used. LOL

  • peregrineperegrine MVP
    edited December 2014

    I surrender. please re-read the instructions. take a nap get some coffee and try again after you are fully rested and fully focused.

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

  • peregrineperegrine MVP
    edited December 2014

    .

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

  • dnigrindnigrin
    edited December 2014

    @peregrine, I followed your 17 step directions above without a problem. My dashboard shows FileUpload plugin version 1.8.4.1. I'm using Vanilla version 2.1.6 on an IIS server.

    However, after choosing an image file to upload, the thumbnail does not show the image, and the resulting post also doesn't show the image. Screenshots attached. If I click the link in the resulting post though, a new page is loaded and does correctly show the image. Any ideas? Thanks in advance.

  • peregrineperegrine MVP
    edited December 2014

    @dnigrin

    I don't use IIS, and I don't know what you mean. Are you saying after a page reload everything shows correctly?

    or do you mean the thumbnail never shows correctly. perhaps your thumbnail location is pointing to the wrong place. I would use web developer tool to see if you have any errors in finding thumbnail images 404 or something like that. Then investigate where it is trying to find the thumbnail and why it can't read the thumbnail, if that is the case or if it is pointing to the wrong place.

    check your folder and see if a thumbnail is created in /uploads/userpics/......

    could be many issues - lack of thumbnail creation, thumbnail pointing to wrong place, bad file permissions, wrong or bad gd library.

    also start a new discussion "Thumbnails do not appear with FileUpload"

    In any event, I don't have a way to test or solve for you. other than to suggest using ubuntu, I know it works >:)

    here is what I see with the plugin

    after upload.

    after refresh

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

  • Thanks for the response peregrine - I started a new thread

Sign In or Register to comment.