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

FileUpload on 2.1b1

This discussion is related to the fileupload addon.
vrijvlindervrijvlinder Papillon-Sauvage MVP
edited June 2013 in Feedback

If you installed fileupload from this addon repo and tried using it with 2.1b and you experience problems , make sure you have all the files necessary which are not available here, they are at Github

https://github.com/vanillaforums/Addons/tree/master/plugins/FileUpload

The fileupload from here is missing a file called fileupload_functions.php . If you want to use file upload for 2.1 you need to get it from the Github Repo.

Also I recommend removing the version requirements or changing them to match your version.

TamaLarkjeongwee
«1

Comments

  • jeongweejeongwee Vanilla version 2.6 ✭✭
    edited September 2013

    i downloaded it from github and uploaded it to my site, but i cant enable it from dashboard. why?( im 2.1b1 )

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    can you enable other plugins from dashboard?

    if yes, then you failed to remove the application version requirements from the plugin.

    jeongwee
  • jeongweejeongwee Vanilla version 2.6 ✭✭

    yea, i can enable other plugins, how do i do now.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited September 2013

    go to the class.FileUpload.Plugin.php and remove the whole sentence from the list

    'RequiredApplications' => array('Vanilla' => '2.1b1'),

    jeongwee
  • jeongweejeongwee Vanilla version 2.6 ✭✭
    edited September 2013

    i removed

    'RequiredApplications' => array('Vanilla' => '2.1b1'),

    still cant enable it.

    or u mean all of this?

    $PluginInfo['FileUpload'] = array(
       'Description' => 'Images and files may be attached to discussions and comments.',
       'Version' => '1.8',
       'RequiredTheme' => FALSE, 
       'RequiredPlugins' => FALSE,
    'RequiredApplications' => array('Vanilla' => '2.1b1'),
       'HasLocale' => FALSE,
       'MobileFriendly' => TRUE,
       'RegisterPermissions' => array(
          'Plugins.Attachments.Upload.Allow' => 'Garden.Profiles.Edit',
          'Plugins.Attachments.Download.Allow' => 'Garden.Profiles.Edit'
       ),
       //'SettingsUrl' => '/dashboard/plugin/fileupload',
       //'SettingsPermission' => 'Garden.Settings.Manage',
       'Author' => "Tim Gunter",
       'AuthorEmail' => '[email protected]',
       'AuthorUrl' => 'http://www.vanillaforums.com'
    );
  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    no just the sentence I posted.

    If you have another plugin that uploads enabled you might need to disable that one. Try enabling in the config.php the plugin. If it gives error then something else is wrong.

    jeongwee
  • jeongweejeongwee Vanilla version 2.6 ✭✭

    i have ImageUpload on my site, you mean both plugin cant using together? im gonna try edit at config.php see wat happened.

  • ShadowdareShadowdare r_j Moderator

    You can use both plugins together. Is there an error message when you enable it?

    Add Pages to Vanilla with the Basic Pages app

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

    jeongwee
  • jeongweejeongwee Vanilla version 2.6 ✭✭
    edited September 2013

    theres no msg when i trying to enable it and failed.
    i clicked on the enable,then it looks loading.afer 1sec nothing changed .

  • ShadowdareShadowdare r_j Moderator

    There are two things you could do and it doesn't matter which one you do.

    First thing you could do is that you could replace class.categorymodel.php with the new one. https://github.com/vanillaforums/Garden/blob/master/applications/vanilla/models/class.categorymodel.php

    Second thing you could do is use this file for FileUpload: https://github.com/vanillaforums/Addons/blob/346e7abee32237b2f51dbe6041a419f9eceeb5b0/plugins/FileUpload/class.fileupload.plugin.php

    Add Pages to Vanilla with the Basic Pages app

    jeongweeperegrine
  • jeongweejeongwee Vanilla version 2.6 ✭✭

    ok ,i used 2nd way replaced class.fileupload.plugin.php. its solved.

  • peregrineperegrine MVP
    edited September 2013

    What version does its say for the plugin with the github link? never mind the gihub link finally loaded after 5 minutes (its a speed demon). It says version 1.7.1 of file upload.

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

    jeongwee
  • jeongweejeongwee Vanilla version 2.6 ✭✭

    migh i ask one more question?

    how do i set a limit max file size?

  • ShadowdareShadowdare r_j Moderator
    edited September 2013

    Config setting for max file size:

    $Configuration['Garden']['Upload']['MaxFileSize'] = '1MB';

    It will use the smallest number from the config setting, PHP's post_max_size setting, or PHP's upload_max_filesize setting.

    Add Pages to Vanilla with the Basic Pages app

    jeongwee
  • peregrineperegrine MVP
    edited September 2013

    Shadowdare - you are the new search engine. good on 'ya

    I kind of give up after questions that have been answered hundreds of times.

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

    jeongweeShadowdarevrijvlinder
  • jeongweejeongwee Vanilla version 2.6 ✭✭

    sry , havnt . I saw a lot ppl here, so..... :P

  • ShadowdareShadowdare r_j Moderator
    edited September 2013

    @peregrine said:
    I kind of give up after questions that have been answered hundreds of times.

    If you gave up, you wouldn't have replied.

    Add Pages to Vanilla with the Basic Pages app

    peregrinejeongweevrijvlinder
  • peregrineperegrine MVP
    edited September 2013

    @peregrine said:
    .

    I've said alot of things :)

    . being one of my favorite re-edits.

    Well, at least now we have all the info in one spot, for the next person, who doesn't search.

    hard to keep up on replies (re-editing by both replier and replied upon).

    @shadowdare - but your categories.php mod was a new solution for fup 1.8, but who knows if that would have ripple effects, maybe yes, maybe no.

    good answers, nonetheless!

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

    vrijvlinderjeongwee
  • ShadowdareShadowdare r_j Moderator
    edited September 2013

    It probably won't have ripple effects. Make backups in case.

    Add Pages to Vanilla with the Basic Pages app

    peregrine
Sign In or Register to comment.