Results 1 to 6 of 6

Thread: How to stop Sugar from downloading attachments.

  1. #1
    jim.thornton is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    257

    Default How to stop Sugar from downloading attachments.

    Every time I click on an attachment (eg. a PDF file), it tries to save/download the file instead of viewing it within the browser.

    How do I setup sugar or my server to view the file instead of downloading it?

    Apache 2.2.11
    PHP 5.2.9
    Linux CentOS 5.2

    I'm pretty sure it is as simple as putting a line in the .htaccess or the php.ini file but I can't remember what to do and would appreciate the help.
    ________
    Nayuha
    Last edited by jim.thornton; 2011-09-08 at 04:57 AM.

  2. #2
    crmbalah is offline A Prolific Poster
    Join Date
    Mar 2009
    Location
    chennai
    Posts
    418

    Default Re: How to stop Sugar from downloading attachments.

    HI
    customize "file related fields" in list /detail view vardef page through custom code

  3. #3
    roblaus's Avatar
    roblaus is offline Sugar Community Member
    Join Date
    Dec 2006
    Location
    Vienna / Austria
    Posts
    2,850

    Default Re: How to stop Sugar from downloading attachments.

    This has nothing to do with Sugar but is a browser setting. Or the application to view the file isn't installed or not known to your browser.
    To change your browser settings in FF go to tools - options - applications, find the content type and define an action in the right column. No idea about IE.
    __________________________
    Robert Laussegger
    http://www.iscongroup.net

    Bei Fragen: support@iscon.at
    Die deutschen Sprachdateien für SugarCRM und das deutsche Handbuch gibt es hier: http://goo.gl/kPsAz
    Ab sofort auch mit 6.4.2

  4. #4
    jim.thornton is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    257

    Default Re: How to stop Sugar from downloading attachments.

    I'm pretty sure this has to do with a setting on my server not my browser. I believe it is the header that is being sent to the browser. The question is, how do I change it?

    It isn't a browser thing because I can view PDF files on other sites (within browser).
    ________
    LoveMeNow
    Last edited by jim.thornton; 2011-09-08 at 04:57 AM.

  5. #5
    jim.thornton is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    257

    Default Re: How to stop Sugar from downloading attachments.

    3 years and still having this problem... Can anyone please help me?

    THIS IS NOT A BROWSER ISSUE. I can view (within the browser) on ANY site that I go to except for SugarCRM. Everytime I click on an attachment in SugarCRM I get a Save File window. It doesn't give me the option of OPEN/SAVE it forces the download.

    How can I get Sugar to send the Mime-Type so that it doesn't force the download?
    ________
    CherryDesire cam
    Last edited by jim.thornton; 2011-09-08 at 05:11 AM.

  6. #6
    jim.thornton is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    257

    Default SOLVED: How to stop Sugar from downloading attachments.

    WARNING: Use at your own risk!!! It worked for me but I take no responsibility for anything going wrong.

    First... I'm posting this solution because I have been searching for 3 years (off and on) for an answer to this question and everyone that ever responds says "It is a browser issue."

    IT IS NOT!!!!

    Sugarcrm by default forces you to download the attached file to a note/document file. Sometimes you want to open the file without having to first download and save the file then open it. It is quicker to be able to just click open.

    Second... This does not solve the problem of opening it within the browser, but at least you have the option now of just clicking OPEN instead of first having to save it.

    STEP 1:
    Locate download.php in the main SugarCRM directory.

    STEP 2:
    Goto Line 132
    Change -> header("Content-type: application/force-download");
    To -> header("Content-type: application/octet-stream");

    STEP 3:
    Save the file again as download.php

    That's it!!! Now you will have the option of saving the file or opening it.
    ________
    HEAT GUN VAPORIZER BOWL
    Last edited by jim.thornton; 2011-09-08 at 05:11 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 2009-06-18, 01:57 AM
  2. Replies: 2
    Last Post: 2008-07-04, 01:44 PM
  3. Replies: 2
    Last Post: 2007-08-20, 03:56 PM
  4. Replies: 0
    Last Post: 2007-02-02, 09:22 AM
  5. Downloading from Sugar site
    By Scotweb in forum General Discussion
    Replies: 3
    Last Post: 2005-12-02, 08:46 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
  •