Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to view PDFs after upgrade to 1.7 #56

Closed
jthomaschewski opened this issue Jun 9, 2013 · 5 comments
Closed

Unable to view PDFs after upgrade to 1.7 #56

jthomaschewski opened this issue Jun 9, 2013 · 5 comments

Comments

@jthomaschewski
Copy link

I've upgraded my seafile server to version 1.7. Now I get an Page unavailable error when clickin on an PDF file in the seahub interface.

[ERROR] django.request:212 handle_uncaught_exception Internal Server Error: /repo/8dd5XXXXXXXXXXXXXXX/files/
Traceback (most recent call last):
  File "/home/seafile/haiwen/seafile-server-1.7.0/seahub/thirdpart/Django-1.5.1-py2.6.egg/django/core/handlers/base.py", line 115, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/home/seafile/haiwen/seafile-server-1.7.0/seahub/seahub/base/decorators.py", line 71, in _decorated
    return func(request, *args, **kwargs)
  File "/home/seafile/haiwen/seafile-server-1.7.0/seahub/seahub/views/file.py", line 297, in view_file
    elif filetype in (DOCUMENT, PDF) and fsize > OFFICE_PREVIEW_MAX_SIZE:
NameError: global name 'OFFICE_PREVIEW_MAX_SIZE' is not defined

Opening the link to a shared PDF works as expected (With PDF viewer).

@lins05
Copy link
Contributor

lins05 commented Jun 10, 2013

This is a bug in the code. I have fixed it in commit fd9adcd3a3676f5890e5870ba4aab62613e52ba1 and updated the server 1.7.0 tarball on the download site.

A a quick fix for you:

Download this file and replace seafile-server-1.7.0/seahub/seahub/views/file.py with it. Restart seahub and then it should be ok.

Thanks for reporting!

@jthomaschewski
Copy link
Author

Thanks for the quick fix. It's working now!

@HenriWahl
Copy link
Contributor

Can you re-relase the mentioned file https://seacloud.cc/f/f74bf4a054/ as it seems to be the needed fix ofr my problem #67? It is not available at the moment. Thanks!

@lins05
Copy link
Contributor

lins05 commented Jul 25, 2013

You can get it here:

https://seacloud.cc/f/c60c3a3fa0/

On Thu, Jul 25, 2013 at 6:02 PM, HenriWahl notifications@github.com wrote:

Can you re-relase the mentioned file https://seacloud.cc/f/f74bf4a054/ as
it seems to be the needed fix ofr my problem #67#67?
It is not available at the moment. Thanks!


Reply to this email directly or view it on GitHubhttps://github.com//issues/56#issuecomment-21544216
.

@HenriWahl
Copy link
Contributor

Thanks! It works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants