Commit d264f480 by benjaoming

Further frustations perhaps fixed on file upload issues

parent 751c21ad
......@@ -13,7 +13,6 @@ from django.views.generic.base import TemplateView, View
from wiki.core.http import send_file
from django.http import Http404
from django.db import transaction
import os
class AttachmentView(ArticleMixin, FormView):
......@@ -47,7 +46,7 @@ class AttachmentView(ArticleMixin, FormView):
except models.IllegalFileExtension, e:
transaction.rollback()
messages.error(self.request, _(u'Your file could not be saved: %s') % e)
except IOError:
except Exception:
transaction.rollback()
messages.error(self.request, _(u'Your file could not be saved, probably because of a permission error on the web server.'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment