Merge pull request #787 from akretion/fix-upload-path

fixes bug #786 per_page_uploads: incorrect file path if page is inside some directory
This commit is contained in:
Dawa Ometto
2014-01-25 02:12:55 -08:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -449,7 +449,7 @@ module Precious
@content = page.formatted_data
@upload_dest = settings.wiki_options[:allow_uploads] ?
(settings.wiki_options[:per_page_uploads] ?
@name : 'uploads'
"#{path}/#{@name}".sub(/^\/\//, '') : 'uploads'
) : ''
# Extensions and layout data
@@ -155,7 +155,7 @@ $(document).ready(function() {
fields: [
{
type: 'file',
context: 'Your uploaded file will be accessible at /'+uploadDest+'/[filename]',
context: 'Your uploaded file will be accessible at<br>/'+uploadDest+'/[filename]',
action: baseUrl + '/uploadFile'
}
],