OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



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
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a technical support question, try the OJS Technical Support subforum.

Making documents public when adding to the File Browser

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

Hi,

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.
vgabler
 
Posts: 91
Joined: Thu Feb 18, 2010 1:22 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.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8307
Joined: Wed Aug 10, 2005 12:56 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
http://[your.journal.path]/files/journals/[journal_id]/[sub_folder]/[uploaded_file]


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:
http://pkp.sfu.ca/support/forum/viewtopic.php?f=28&t=5947

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
http://[your.journal.path]/public/journals/[journal_id]/[sub_folder]/[uploaded_file]


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
http://[your.journal.path]/public/journals/1/forms/file1.pdf
msaghaei
 
Posts: 119
Joined: Sun Jan 08, 2006 1:01 pm


Return to OJS Development

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests