OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Path for uploaded files

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

Forum rules
What to do if you have a technical problem with OCS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved. Please note that this FAQ is OJS-centric, but most issues are applicable to both platforms.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a development question, try the OCS Development subforum.

Path for uploaded files

Postby m.gori » Wed Jan 30, 2008 6:16 am

Hello everyone,

problem: I have to upload files and make them donwloadable from within an OCS website.
They don't have to do with papers nor any other already-managed-stuff in OCS.
They're just plain files that I want to be "visible".

So the question is: how can I access files uploaded via the "Files browser" tool provided to administrators..?
In other words, if I have to insert an actual link to them inside the public website...
how can I resolve the relative path, how can I refer to them?
Is there any option or default configuration that I am missing in order to find this out?

Many thanks in advance for any suggestion

Marco
m.gori
 
Posts: 8
Joined: Thu Dec 20, 2007 7:23 am

Re: Path for uploaded files

Postby jmacgreg » Wed Jan 30, 2008 12:26 pm

Hi Marco,

When a conference manager uploads files with the Files Browser tool, they are actually stored in

ocspath/files/conferences/[conference#]/[optional created directory]/filename.txt.

So: when conference manager opens the Files Browser tool, they see "Index of /", with typically one directory (schedConfs) already in there. The CM can create a new directory here, say "publicFiles", and upload files into that directory (or, of course, create even more subdirs within that one). Say the CM uploads a file called campusmap.pdf. It can be linked to with the following code:

Code: Select all
<a href="http://mysite.com/ocs/files/conferences/1/publicFiles/campusmap.pdf">campus map</a>


Provided, of course, that this is conference 1 on the site.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: Path for uploaded files

Postby jmacgreg » Wed Jan 30, 2008 1:34 pm

Hi Marco,

Actually, I've been corrected by Alec on the correct handling up submitting public files. The preferred method would be as follows:

The files in the "files" directory (the actual location of which is configured in config.inc.php) are considered private and shouldn't be accessible directly via the web. If anyone wants to be able to upload public files via the Files Browser, it's possible to do this by creating a symbolic link from the files path for the particular conference (e.g.
/path/to/files/conferences/1) to the public files directory. To do this, for example, run:

Code: Select all
ln -s /path/to/ocs2/public/conferences/1 /path/to/files/conferences/1/public


Then you should be able to use the Files Browser to upload files into the "public" directory for that conference (if the "files" directory, configured in config.inc.php, is "/path/to/files" and the OCS install is in "/path/to/ocs2").

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am


Return to OCS Technical Support

Who is online

Users browsing this forum: No registered users and 2 guests