diff --git a/etc/nginx/pandora b/etc/nginx/pandora index 419120aa..8ef1f433 100644 --- a/etc/nginx/pandora +++ b/etc/nginx/pandora @@ -55,11 +55,11 @@ server { proxy_buffering off; proxy_read_timeout 90; #should be in sync with gunicorn timeout proxy_connect_timeout 90; #should be in sync with gunicorn timeout - client_max_body_size 32m; if (!-f $request_filename) { proxy_pass http://127.0.0.1:2620; break; } + client_max_body_size 32m; } error_page 400 /; diff --git a/pandora/manage.py b/pandora/manage.py index 700a1802..d33da6f9 100755 --- a/pandora/manage.py +++ b/pandora/manage.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python import os import signal import sys diff --git a/static/js/document.js b/static/js/document.js index a13332d2..6d1b2567 100644 --- a/static/js/document.js +++ b/static/js/document.js @@ -66,7 +66,7 @@ pandora.ui.document = function() { ? pandora.user.ui.documents[item.id].position : 1, url: '/documents/' + item.id + '/' - + pandora.safePDFName(item.title + '.' + item.extension), + + item.title.replace('?', '_') + '.' + item.extension, width: that.width(), zoom: 'fit' }) diff --git a/static/js/documentDialog.js b/static/js/documentDialog.js index b2c17308..a8d1d581 100644 --- a/static/js/documentDialog.js +++ b/static/js/documentDialog.js @@ -196,7 +196,7 @@ pandora.ui.documentDialog = function(options) { ? pandora.user.ui.documents[item.id].position : 1, url: '/documents/' + item.id + '/' - + pandora.safePDFName(item.title + '.' + item.extension), + + item.title.replace('?', '_') + '.' + item.extension, width: dialogWidth, zoom: 'fit' }) diff --git a/static/js/utils.js b/static/js/utils.js index 3ce86c15..7f80064d 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -2625,11 +2625,6 @@ pandora.openURL = function(url) { } }; -pandora.safePDFName = function(name) { - name = name.replace('?', '_').replace('#', '_'); - return name; -}; - pandora.saveURL = function(url, name) { var link = document.createElement('a'); if (typeof link.download === 'string') { diff --git a/update.py b/update.py index 0e6c04de..119f9adb 100755 --- a/update.py +++ b/update.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python from __future__ import print_function import json import os