Results 1 to 4 of 4

Thread: Documents - Can non-logged in users download files from Sugar?

  1. #1
    lmcanada is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    22

    Default Documents - Can non-logged in users download files from Sugar?

    We offer a number of marketing video clips to sales reps through our Documents module, and in many cases it would be useful if clients/leads could access the link and download the files as well.

    When a non-logged in client tries this, the site returns "Not a valid entry point"

    We don't offer clients access to the CRM, so I would like to know if its possible to let them have access to the documents via the individual file urls.

    Thanks for any advice!

  2. #2
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Documents - Can non-logged in users download files from Sugar?

    Sure, it is just a file in your htdocs/wwwroot directory.

    The trick is figuring out which file it is that you would link to. The way Sugar sets it up is that the name of the file on the file system is actually the ID value of the record in the Sugar DB which references it.

    As long as you know which files to link to from the page you are displaying to your clients, there should be no reason why you can't allow them to download it.

    Note that you might have to mess with the header on the html a bit too as the files do not have an extension on them and the browser wouldn't know how to handle the data.
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  3. #3
    gsrigg is offline Sugar Community Member
    Join Date
    Mar 2007
    Posts
    46

    Default Re: Documents - Can non-logged in users download files from Sugar?

    Quote Originally Posted by Angel
    Sure, it is just a file in your htdocs/wwwroot directory.

    The trick is figuring out which file it is that you would link to. The way Sugar sets it up is that the name of the file on the file system is actually the ID value of the record in the Sugar DB which references it.

    As long as you know which files to link to from the page you are displaying to your clients, there should be no reason why you can't allow them to download it.

    Note that you might have to mess with the header on the html a bit too as the files do not have an extension on them and the browser wouldn't know how to handle the data.
    You could take a copy of download.php and just drop out the enforced checks (entry point, authenticated user ID). Might be the quickest way.

    Cheers,
    ~G

  4. #4
    lmcanada is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    22

    Default Re: Documents - Can non-logged in users download files from Sugar?

    Thanks guys,

    I took gsrigg's suggestion and modified download.php, removing the first if statement so that it doesn't check if a user is logged in. As far as its looks, everything is fine.

    Non-logged in users can download files if they have the link URL, which is totally fine for what we're doing.

    Thanks for the help!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Sugar is slow - some ideas to improve the speed
    By mycrmspacegunnar in forum General Discussion
    Replies: 22
    Last Post: 2012-04-04, 01:44 PM
  2. Big Security worries with Sugar!
    By mycrmspacegunnar in forum General Discussion
    Replies: 28
    Last Post: 2007-07-29, 05:27 AM
  3. PDF Files corrupted on Sugar Download site
    By russhensley in forum Help
    Replies: 0
    Last Post: 2007-07-28, 10:27 PM
  4. Sugar Open Source 3.5.1e Available for Download
    By clint in forum Announcements
    Replies: 0
    Last Post: 2005-12-10, 06:29 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •