Filepath and Content_URL

What is the difference between the content_url field on the FILES table and the ifs_filepath field on the FILE_INFO table?  How can the filepath field be utilized for SDK and other programs?  Why is the content_url field sometimes null?

Add Comment
8 Answer(s)

CONTENT_URL is used to store the link to indexing content for the file. I cannot say for certain that if CONTENT_URL is null then the file has not been indexed, but that is the obvious conclusion. IFS_FILEPATH stores the directory/file name for where the file is located on the primary file manager server. If the file is also located on a distributed/local file manager, there will be a value in HFS_FILEPATH.

Agile Angel Answered on July 20, 2018.

Hi Kevin,

We are using DFS but we don’t have any value in HFS_FILEPATH for any row of file_info table.

Also, we have indexing for full text search enabled for  file types, but when I searched our files table where content_url is not null, I got only 4 file types. content_url is missing for html, xls & ppt file types, but available for doc, pdf, txt, rtf & xml.  Dunno why.

@Matt: Are you sure that docx is not supported even if we add it under file types of Full Text Search?

on July 26, 2018.

Yes, the Agile Admin Guide specifies the file types that are supported under Full Text Search (I have 9.3.3. but looks like it’s the same going up to 9.3.6).

on July 26, 2018.

I tried adding docx in the file types of Full Text Search and then manually run indexing & update content url and found that content url has been generated for the docx files which are in the attachment tab. Our system is 9.3.5. So I believe for docx also, indexing is working.

on July 27, 2018.
Add Comment

Thanks Kevin, I think you might be on to something there.  Looks like only doc, pdf, txt, xls, and xml files are being indexed in our system as those are some of the file types supported under Full Text Search.  Docx is not supported so its content_url field remains null.  

Looks like we can use content_url as a sort of ‘back door’ to get files.  Is there a way to use the ifs_filepath column in SDK to get and read files?

Agile Angel Answered on July 20, 2018.
Add Comment

CONTENT_URL will not get you the file per se, but it will get you what was indexed from the file, so far as I understand it.
 IFS_FILEPATH should enable you to open the file, but you will have to include the base directory of the file vault to get the full directory path for the file. Other than that, yes, I could see it being used to open a file.

Agile Angel Answered on July 24, 2018.
Add Comment

I’ve been able to get the file off of the CONTENT_URL using BufferedOutputStream from a URL.openStream() via Java, though the CONTENT_URL field only lasts a little bit before it’s nullified.  I’m looking to see if I can run that same method using the IFS_FILEPATH instead.  I tried appending the FileManger URL +’C:AgileFiles’ (base_storaged_dir) + IFS_FILEPATH to see if I can use a direct URL to a file but it hasn’t succeeded.  Any ideas there?

Agile Angel Answered on July 24, 2018.
Add Comment

Hi Matt,

Do not append the FileManager URL with C:/AgileFiles/ (base storage directory of vault) + IFS_FILEPATH. The vault’s base storage directory path concatenated with the IFS_FILEPATH is sufficient enough to get the physical files. Let me know if that works.

Agile Expert Answered on July 24, 2018.
Add Comment

Hi Swagoto,

I might be missing some small detail but I can’t seem to figure it out.  I’ve tried many combinations but keep getting a Tomcat “The requested resource XXXX is not available” error. 

Is this anywhere close to how we should get a file directly (to give out a more concrete example)?  
http://[agile]:[port]/Filemgr/AttachmentServlet/000/770/474/agile77047111.pdf

Agile Angel Answered on July 26, 2018.
Add Comment

Matt, please do not add the http://agile:port/Filemgr/AttachmentServlet before the IFS_FILEPATH value you get from DB. What should be concatenated as a prefix with that value, is the base storage directory folder path which you will get either from vault table of DB or from java client configuration of file manager. So if the base storage directory of your system is defined as C:AgileFiles

then you should be using this to get the file from the vault:

InputStream is = new FileInputStream(new File(“C:/AgileFiles/000/770/474/agile77047111.pdf”));

 

Agile Expert Answered on July 26, 2018.
Add Comment

Thanks for your help, Swagoto,
The input stream is precisely the end goal of my original question – thanks for reading my mind! 
It didn’t work for me though – if it does for anyone else, that’s great.  Looks like within Agile API I can make it work off of an InputStream is = ((IAttachmentFile)row).getFile() per the Agile API user guide.  I have both ‘C:AgileFiles’ (test server) and ‘D:AgileFiles’ as my base_storage directory so when I tried InputStream  is = new FileInputStream(new File(“C:/Agile/Files/000/770/474/agile77047443.pdf”)); I received the java.io.FileNotFoundException “C:AgileFiles?0’4agile77047443 (The system cannot find the file specified)”.

Agile Angel Answered on July 26, 2018.

Are you able to manually access the file from this path: C:/Agile/Files/000/770/474/agile77047443.pdf ?

Or this one: D:/Agile/Files/000/770/474/agile77047443.pdf ?

From the error message looks like the code is not able to parse the forward slash character and also the file extension, which should not be the ideal case.

Alternatively, you can try to put the path like this:

InputStream  is = new FileInputStream(new File(“C\:\\Agile\\Files\\000\\770\\474\\agile77047443.pdf”));

on July 27, 2018.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.