Author Topic: File paths for documents and task imports  (Read 3403 times)

pminix

  • Newbie
  • *
  • Posts: 4
    • View Profile
File paths for documents and task imports
« on: July 07, 2009, 05:19:19 pm »
New guy trying this out, impressive so far:

1.)  How is the file path configured for uploaded and created documents (and presentations) - I would like to point those files to a different location then my webserver?

2.)  Is anyone working on an import tool for task information?  Rekeying data from Project is a pain.

3.)  What happens to the custom fields in the add task window - they are not visible, nor do they show up on the report.

gman

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Re: File paths for documents and task imports
« Reply #1 on: July 08, 2009, 10:02:30 am »
As for item 1) , there is a bit of work involved to get the file path. In the table file_repo_attributes there are three fields, id, attribute, value. The id field entries contain the path and file name concatenated. For each uploaded file, there are three attribute entries, name, size and type. You find the path by breaking down the id field entry.

Take the id entry ad4fa937c32b2c05d48dd0e17f773ae965c1ab0d

Under the upload directory:

ad4 is a child directory of upload

fa9 is a child directory of ad4

37c is a child directory of fa9

32b2c05d48dd0e17f773ae965c1ab0d is the file name in the 37c directory.

In the table file_repo_attributes you will have three id values for ad4fa937c32b2c05d48dd0e17f773ae965c1ab0d, one associated with the name attribute of the file you uploaded (mydoc.odg), one associated with the size attribute of the file in bytes (16000) and one associated with file type attribute 'application/vnd.oasis.opendocument.graphics';

I haven't looked to see how the file name or id values are calculated/created. Someone with more knowledge could probably make more sense of this and provide some direction as to a best practice for accessing the files via the path.

pminix

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: File paths for documents and task imports
« Reply #2 on: July 08, 2009, 04:51:06 pm »
Thanks

Knowing the field hashes is pretty impressive for a "newbie".  I interpret that hashing to mean the files stay in the upload directory in some sort of OpenGoo created file structure.

Would it be easier for me to link the whole upload directory to another server?  or is there a config value that can define the location of that directory?  My purpose is to get the files off of my Webserver.


gman

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Re: File paths for documents and task imports
« Reply #3 on: July 08, 2009, 11:25:48 pm »
Do you want the files on a completely different web server or do you want the files in a different location on the web server? If a different location on the same server. you could script something that takes the files from the OpenGoo upload file structure and places them in a file structure you create with the file names taken from the values in the name attribute entry. You could compress (i.e. zip) that new directory structure and maybe FTP to another sever where it could be unzipped or simply FTP the new file structure to another server?


pminix

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: File paths for documents and task imports
« Reply #4 on: July 09, 2009, 10:47:46 am »
I want the files on a different machine for performance and security reasons.  It may end up being just a bunch of disks or a freenas machine.

Rather then all of the churn associated with moving the files twice, I was hoping to configure OpenGoo to use another directory structure on the network.  I cna replicate the structure over with an external script for now, although I would prefer the files never resided on the web server.

-------------

I have been spending time considering the second problem.  Trying to use Kettle to pull data in from a schedule and WBS.  What happens to the custom fields?