Just started implementing the file api and I think I'm in a brain freeze....How can I access a file via the API? The name field returns the file name (i.e. yourFile.pdf) but not the full path. The permalink is cool but doesn't allow direct access to the file. How can I access the file via the API?
By accessing file's permalink, you'll be able to download the file to your local storage and work with it from there. System will restore full file details, including name and proper MIME type.
Images can be accessed directly by adding disposition=inline GET variable to the URL. Note that is not officially supported, but it should work in current activeCollab version - use it at your own risk.
When I access the permalink, it requires a login, the normal API authentication doesn't work.
Maybe I'm not understanding what you're saying entirely. For instance, if I'm trying to access a file via GET, you're saying I can do something like this?:
...api.php?path_info=projects/2/files/1516&disposition=inline...
I went in to the PM and saw how it works from there and see what you mean. So basically bypass the /api.php routing and just go right to the file. Works fine. Thanks1!
Actually....it only works if you're logged in. Which is fine for security...but I don't see a way to make it work via the RESTful api. Trying to access to the files causes me to go to the login screen.