Results 1 to 7 of 7

Thread: change the location of document storage

  1. #1
    sylvaindoc is offline Sugar Community Member
    Join Date
    Mar 2006
    Posts
    34

    Default change the location of document storage

    Hi there,
    I'd like to change the folder where documents and attachments are stored. They are currently stored in cache/upload, but I don't have too much space available on this drive so I'd like to change the location for another drive or even better for a sharepoint website.
    Has anyone allready tried it?
    Thanks

  2. #2
    sadek's Avatar
    sadek is offline Sugar Team Member
    Join Date
    Sep 2005
    Posts
    244

    Default Re: change the location of document storage

    There is a directive in the config.php:
    'upload_dir' => 'cache/upload/',

    You should be able to change that to an absolute path, and as long as the webserver can write to the directory, all should be fine. Make sure you copy everything out of <sugarroot>/cache/upload to the new directory.

    -Sadek

  3. #3
    sylvaindoc is offline Sugar Community Member
    Join Date
    Mar 2006
    Posts
    34

    Default Re: change the location of document storage

    Thanks for the answer sadek.
    What does it look like an absoluth path?
    I tried several things without any success:
    - 'upload_dir' => 'D:\\SugarDocument\\',
    - 'upload_dir' => 'D:/SugarDocument',
    - 'upload_dir' => 'D:\SugarDocument\',
    - ...

    Thanks,
    Sylvain

  4. #4
    sadek's Avatar
    sadek is offline Sugar Team Member
    Join Date
    Sep 2005
    Posts
    244

    Default Re: change the location of document storage

    The following is the one to use:
    'upload_dir' => 'D:/SugarDocument',

    -Sadek

  5. #5
    sylvaindoc is offline Sugar Community Member
    Join Date
    Mar 2006
    Posts
    34

    Default Re: change the location of document storage

    Thanks for your help but it doesn't work...
    When using 'upload_dir' => 'D:/SugarDocuments/' in the config.php file and trying to open a document from Sugar my browser try goes to the address:
    file:///D:/SugarDocuments/9fb302db-e2d2-c688-2e0f-446c5aed19c2Docuplus%2520%2526%2520Metavante%2520P ress%2520release%2520re%2520CSF%2520Support.pdf
    This is the right location on the server and the document is actually stored there.

    In comparaison when I'm using 'upload_dir' => 'cache/upload/', my browser opens
    https://my server/sugarcrm/cache/upload/9fb302db-e2d2-c688-2e0f-446c5aed19c2Docuplus%20%26%20Metavante%20Press%20r elease%20re%20CSF%20Support.pdf.

    Any idea?

  6. #6
    ftreml's Avatar
    ftreml is offline Sugar Community Member
    Join Date
    May 2005
    Location
    Vienna, Austria
    Posts
    399

    Default Re: change the location of document storage

    The upload dir you are using has to be a subdirectory of your sugar root folder - otherwise you won't be able to access those files from your webbrowser. seting "upload_dir" to a relative path showing to a directory outside your webroot won't work either, because your webserver won't deliver files outside your webroot. That's why I recommend to stick with the "cache/upload" path.
    Maybe you are interested in ZuckerDocs - it provides file attachment capabilities and makes it possible to store your documents anywhere on your filesystem.

  7. #7
    montolla's Avatar
    montolla is offline Sugar Community Member
    Join Date
    Sep 2011
    Location
    Medellin, Colombia
    Posts
    49

    Default Re: change the location of document storage

    Quote Originally Posted by ftreml View Post
    The upload dir you are using has to be a subdirectory of your sugar root folder - otherwise you won't be able to access those files from your webbrowser. seting "upload_dir" to a relative path showing to a directory outside your webroot won't work either, because your webserver won't deliver files outside your webroot. That's why I recommend to stick with the "cache/upload" path.
    Maybe you are interested in ZuckerDocs - it provides file attachment capabilities and makes it possible to store your documents anywhere on your filesystem.
    Hello


    Maybe you need to move the public folder to the D:\ directory. I mean move ../htdocs or ../http or ../public ../www to d:\web\htdocs

    You can configurate this at apache of your webserver config file. For example ../bin/apache2/config.php or /etc/apache2/config/.httacces or something like this.



    Thanks

Thread Information

Users Browsing this Thread

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

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
  •