Results 1 to 7 of 7

Thread: I can not download documents

  1. #1
    twooten is offline Junior Member
    Join Date
    Feb 2007
    Posts
    3

    Default I can not download documents

    Hello,

    I can upload documents just fine but when I try to download them all I get is a blank page. Following is my setup;

    OS: Linux version 2.6.19-1.2288.fc5 (brewbuilder@hs20-bc1-7.build.redhat.com) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-51)) #1 Sat Feb 10 14:52:17 EST 2007

    Sugar Suite Version: Version 4.5.1 (Build 1197)

    Apache: Version 4.5.1 (Build 1197) (aquired with rpm -q httpd)

    PHP: PHP 5.1.6 (cli) (built: Nov 3 2006 07:27:53)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

    Mysql: Ver 14.12 Distrib 5.0.27, for redhat-linux-gnu (i686) using readline 5.0

    I'm not sure if this is some sort of permission problem or not. Thanks for any help.

    Tim

  2. #2
    twooten is offline Junior Member
    Join Date
    Feb 2007
    Posts
    3

    Default anybody got any ideas?

    Still can't figure this out.

    Thanks,

    Tim

  3. #3
    sanjaykatiyar1's Avatar
    sanjaykatiyar1 is offline Sugar Community Member
    Join Date
    Feb 2006
    Location
    Bangalore
    Posts
    600

    Default Re: anybody got any ideas?

    Are you doing upload/download in the Documents module?
    Is user same for downloading?

    If answers for above is yes, then I doubt your upload was successful.
    Sanjay Katiyar
    iPhone and Android solutions http://www.apptility.com

  4. #4
    twooten is offline Junior Member
    Join Date
    Feb 2007
    Posts
    3

    Default Re: I can not download documents

    Thanks for your reply. I am using the Documents module. I haven't changed or customized anything as far as the module goes. It is the same user doing the uploading and attempting to download. I know that the upload is working because I can log into my server and see the file being uploaded to the 'cache/uploads' directory. One strange thing I noticed is that the file name is changed to some string of alphanumeric characters. I can see what what sort of file the file is by doing a 'file <filename>' from the command line. For instance I uploaded a PDF file and when I ran the command 'file' on the new file that showed up in cache/uploads, I see that it is a PDF file.

    Thanks again for your help

  5. #5
    chiena is offline Junior Member
    Join Date
    Mar 2007
    Posts
    1

    Default Re: I can not download documents

    same problem here. As assigned with both user and admin role for testing, i am given access to upload and to view all the documents. I've tried to upload a document which was successful, but then upon viwing the list of documents, the result is zero, i was unable to view any documents. If i search for the table of documents in the database table, the record of the documents uploaded are all there. Can somebody give us any ideas as to what could be the problem here? thanks in advance.

    chiena

  6. #6
    Beefeater is offline Sugar Community Member
    Join Date
    Jan 2007
    Location
    Sydney
    Posts
    29

    Default Re: I can not download documents

    4.5.1

    I had to change in download.php

    header("Pragma: no-cache");

    to

    header("Pragma: cache");

    for it to work at all.

    I also had to replace

    if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/MSIE/", $_SERVER['HTTP_USER_AGENT'])) {
    // cn: bug 7870 IE cannot handle MBCS in filenames gracefully. set $name var to filename
    $name = str_replace("+", "_", $row['name']);
    $name = $locale->translateCharset($name, 'UTF-8', $locale->getOutboundEmailCharset());
    } else {
    // ff 1.5+
    $name = mb_encode_mimeheader($name, $locale->getOutboundEmailCharset(), 'Q');
    }

    with

    $name = str_replace("+", "_", $row['name']);
    $name = $locale->translateCharset($name, 'UTF-8', $locale->getOutboundEmailCharset());

    for firefox to work.

    In IE7 I had to check "Do not save encrypted pages to disk".

    But I'm using Apache with SSL.

    Cheers

  7. #7
    3mentina is offline Sugar Community Member
    Join Date
    May 2006
    Posts
    16

    Default Re: I can not download documents

    I made the changes in download.php, but I only got:

    %PDF-1.3
    %âãÏÓ
    313 0 obj
    <<
    /Linearized 1
    /O 316
    /H [ 1544 688 ]
    /L 168486
    /E 28086
    /N 21
    /T 162107
    >>
    endobj

    etc....


    In firefox, IE is OK.


    In the code there is:
    Code:
    else {
    			// ff 1.5+
    			//$name = mb_encode_mimeheader($name, $locale->getOutboundEmailCharset(), 'Q');
    		}
    mus I delete // to let it work?
    Last edited by 3mentina; 2007-05-28 at 10:49 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Can upload, but not download documents
    By ansgar in forum Help
    Replies: 6
    Last Post: 2006-05-25, 06:28 AM
  2. Documents Module: Anyone download successfully?
    By GenericHuman in forum Help
    Replies: 11
    Last Post: 2006-05-18, 09:34 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
  •