Making documents public when adding to the File Browser

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Posts: 96
Joined: Thu Feb 18, 2010 1:22 pm

Making documents public when adding to the File Browser

Postby vgabler » Fri Mar 26, 2010 12:10 pm


We recently had a request to publish links to PDF files on a journal home page and in the announcements section. After uploading the PDF to a newly created Forms section in the File Browser, we used the link for that PDF as a hyperlink for text on the home page and announcements page. We later found that the PDF could only be viewed when a user was logged in (which we do not require login to view any content in the Setup). We were able to create a public directory with an in-house patch. However, systems I've worked with in the past (specifically, the Journal Administrative Management System for the Highwire Press journal host) contain a "publish content" feature in the File Browser that allows you to upload files and then "publish" them so you can then freely link to the unrestricted content.

Is this something that OJS would consider for a future version? I know that we have the ability to create static pages with additional content, but there is a need for linking to document types such as PDF or excel files (particularly if we want to give readers access to a downloadable form). This would greatly increase the flexibility in publishing content to the main pages of the journal, without creating separate patches that need to be followed through the upgrades.

I appreciate any feedback, and hope this will be made a component of future versions.

All best,

Vanessa Gabler
Last edited by vgabler on Mon Mar 29, 2010 12:33 pm, edited 1 time in total.

Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: Making documents public when adding to the File Browser

Postby asmecher » Sun Mar 28, 2010 6:01 pm

Hi Vanessa,

The quickest work-around that we're aware of is to create a symbolic link from your files directory (the one you can reach via the files browser) into some public space for your journal's public files to be stored. This will allow the Journal Manager to upload files into a public area via the files browser. Note that you'll have to trust your Journal Managers -- it'll be possible to upload any file type, including .php scripts.

Alec Smecher
Public Knowledge Project Team

Posts: 119
Joined: Sun Jan 08, 2006 1:01 pm

Re: Making documents public when adding to the File Browser

Postby msaghaei » Mon Mar 29, 2010 12:31 pm

If the files folder is under the same folder as where the index.php resides (which is not secure) then the direct link will works fine, but you have to know that the link provided in the file browser when moving the mouse over the "Download" link or over the name of the file is not the required direct link. It works only for Journal Manager. Direct link for embedding in web pages will be something like:

Code: Select all


This should works when the files folder is web accessible and is not protected against direct access.

A safer approach may be to use public folder for this purpose. Again the public folder must be web accessible (under your web root where index.php resides). If this is your choice, the Public Folder Browser Plugin at:

may be used if you do not have direct ftp access to your server.
After uploading the file in the journal public folder again the direct link would be something like this:

Code: Select all


for example if you have created a forms folder in the journal public folder and uploaded file1.pdf into that folder, and the journal_id of your journal is 1, then the direct link useful for embedding is:

Code: Select all


Return to “OJS Development”

Who is online

Users browsing this forum: No registered users and 2 guests