05-29-2006 09:18 AM
05-30-2006 05:28 AM
06-11-2006 12:55 PM
Alfresco stores file content on the file system by default - only meta-data is stored in the database, so this should suit your needs.
06-12-2006 05:47 AM
Alfresco stores file content on the file system by default - only meta-data is stored in the database, so this should suit your needs.
That's oversimplifying a little. Yes, the content is stored in the filesystem, but the names are mangled into something totally unusable outside of Alfresco. I've been unable to, at this point, find a mapping between the filesystem name and the actual content properties (name, author, description, etc.) inside the database. Could you or anyone else point me off into the right direction?
06-12-2006 09:23 AM
True, and there are good reasons for that. Changing the names means that we don't have to worry about the underlying filesystem storing utf-8 or similar filenames that may cause problems, it's also good for security of the files.
The mapping is via the {http://www.alfresco.org/model/content/1.0}content property in the node_properties table, the contentUrl is part of the value stored in the string_value column.
SELECT guid FROM node_properties WHERE qname = '{http://www.alfresco.org/model/content/1.0}name' AND string_value = 'MX Control.doc';# find /opt/alfresco/alf_data/contentstore/2006 -iname '74ecdfb5-f7d0-11da-baf4-8975711acf00*'
## find /opt/alfresco/alf_data/contentstore/2006 -iname '*-f7d0-11da-baf4-8975711acf00*'
/opt/alfresco/alf_data/contentstore/2006/6/9/11/74f34857-f7d0-11da-baf4-8975711acf00.bin
# file /opt/alfresco/alf_data/contentstore/2006/6/9/11/74f34857-f7d0-11da-baf4-8975711acf00.bin
/opt/alfresco/alf_data/contentstore/2006/6/9/11/74f34857-f7d0-11da-baf4-8975711acf00.bin: Microsoft Office Document
#Obviously you should only ever use the Alfresco APIs to change these values. All of the services in the Alfresco repository are pluggable, so the way that files are stored could be changes without affecting the rest of the system.
06-12-2006 10:15 AM
True, and there are good reasons for that. Changing the names means that we don't have to worry about the underlying filesystem storing utf-8 or similar filenames that may cause problems, it's also good for security of the files.
Security through obscurity is no security at all. If your server is blown open they also have the mapping tables, which means that there is no enhanced security through renaming the files like this. Also, chances are that you're already making everything very, very open through your CIFS, FTP or webDAV access methods.
The "we don't worry about screwy filenames" is a very good argument though. Portability is *definitely* enhanced through this.The mapping is via the {http://www.alfresco.org/model/content/1.0}content property in the node_properties table, the contentUrl is part of the value stored in the string_value column.
I can't seem to find the mapping. I can useSELECT guid FROM node_properties WHERE qname = '{http://www.alfresco.org/model/content/1.0}name' AND string_value = 'MX Control.doc';
and get back a guid of '74ecdfb5-f7d0-11da-baf4-8975711acf00', but I can't find that anywhere in the filesystem:# find /opt/alfresco/alf_data/contentstore/2006 -iname '74ecdfb5-f7d0-11da-baf4-8975711acf00*'
#
Now if I muck about with the filename a little I do find something:# find /opt/alfresco/alf_data/contentstore/2006 -iname '*-f7d0-11da-baf4-8975711acf00*'
/opt/alfresco/alf_data/contentstore/2006/6/9/11/74f34857-f7d0-11da-baf4-8975711acf00.bin
# file /opt/alfresco/alf_data/contentstore/2006/6/9/11/74f34857-f7d0-11da-baf4-8975711acf00.bin
/opt/alfresco/alf_data/contentstore/2006/6/9/11/74f34857-f7d0-11da-baf4-8975711acf00.bin: Microsoft Office Document
#
But that isn't very scientific. How does one use the database to precisely locate the path and physical filename of content stored within Alfresco?Obviously you should only ever use the Alfresco APIs to change these values. All of the services in the Alfresco repository are pluggable, so the way that files are stored could be changes without affecting the rest of the system.
Absolutely, but for read-only access there should be a way to do this. I haven't benchmarked Alfresco's CIFS/webDAV/FTP access yet but my initial impression is that its performance is a little lacking, especially compared to "raw" FTP/Samba performance on the same physical hardware. It's understandable given that it's a content management system rather than a simple file server but before I decide to throw thousands of documents totaling gigabytes of data into it, I want to have a very clear and low-level understanding of where my data is and how to get at it in the event of a problem.
select string_value from node_properties p join node n on n.id = p.node_id where p.qname='{http://www.alfresco.org/model/content/1.0}name' and n.uuid = 'XXXX';
09-08-2006 12:11 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.