Menu

Attached files for anonymous users?

Help
Joachim
2011-03-31
2016-05-27
  • Joachim

    Joachim - 2011-03-31

    Hi Mark,

    I consider making attached files available even to anonymous users.
    Would it be very hard to change an existing wikindx installation (3.8.2) this way? Where to begin? I'm not a PHP programmer, I'm afraid …

    Thanks for your answer
    Joachim

     
  • Joachim

    Joachim - 2011-04-10

    Hi Mark,

    I consider making attached files available even to anonymous users.
    Would it be very hard to change an existing wikindx installation (3.8.2) this way? Where to begin? I'm not a PHP programmer, I'm afraid …

    Thanks for your answer
    Joachim

     
  • Mark Grimshaw

    Mark Grimshaw - 2011-04-10

    Hi Joachim,

    Sorry, didn't see the initial post of last month.  If you're really sure you want to do this…

    It' relatively simple.  Edit core/attachmentsATTACHMENTS.php

    Comment out the following lines using '//' at the beginning of each line:
    60
    61
    71
    203
    204
    209
    210
    211
    217
    218

    and ensure you've allowed attachments in the Admin|configure menu

    Mark

     
  • Joachim

    Joachim - 2011-11-12

    Hi Mark,

    Comment out the following lines using '//' at the beginning of each line:

    I commented out all these lines, but unfortunately, this didn't work. Any more I could try?

    Thanks
    Joachim

     
  • Mark Grimshaw

    Mark Grimshaw - 2011-11-12

    Hi Joachim,

    I should have added that you need to go to Admin|Configure and

    check 'Allow file attachments:'
    and
    uncheck 'Allow only logged on users to view file attachments:'

    I've just tested it in v3.8.2 and it all works for me.  Read only/anonymous users can now view, delete and upload attachments.

    Mark

     
    • Alex

      Alex - 2016-05-26

      Hi Mark,
      I went to Admin|Configure and cecked "Allow file attachments" and

      unchecked 'Allow only registered users to view file attachments:'.

      When I try to open an attached pdf I get this error message: " Failed to load PDF document "

      I chmoded 775 the attachments folder and it is owned by the web user.

      Do You hava a solution ?

      Wikindx 4.2.2 version

      Thank You in advance !

       
      • Mark Grimshaw

        Mark Grimshaw - 2016-05-26

        Hi Alex,

        I'll look into it over the weekend. Is this the 4.2 code or the latest SVN (v5) code)?

        Mark

         
      • Mark Grimshaw

        Mark Grimshaw - 2016-05-27

        Hi Alex,

        I can't replicate this in either 4.2 or 5.1 code. With the settings you have above, regardless of whether I am a registerd user or a read-only user, I can download and view PDF attachments.

        The other thing: "Failed to load PDF document" is not a wikindx error message so I suspect the error is somewhere else. I'm using Firefox and Safari without problems.

        Regards,

        Maerk

         
  • Joachim

    Joachim - 2011-11-12

    Read only/anonymous users can now view, delete and upload attachments.

    Aww, a terrible misunderstanding. I tried to change the code for something there is a configure option to change, namely allowing anonymous users to view attachments, nothing more. Sorry for bothering you, I totally forgot about this option.

    Joachim

     
  • Mark Grimshaw

    Mark Grimshaw - 2011-11-12

    The admin configure option is only to allow anonymous users to READ attachments.

    The code changes I gave you were to allow ananoymous users to ADD attachments - I thought you were after this ;)

    Mark

     

Log in to post a comment.