First time here? Check out the FAQ!

Revision history  [back]

You can change the file size as described is 'settings.py'.

ASKBOT_MAX_UPLOAD_FILE_SIZE = 10 * 1024 * 1024

When you want to upload and it doesn't work, then look at the messages askbot sends (I have them stored in a file under /tmp/askbot-messages).

EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'
EMAIL_FILE_PATH = '/tmp/askbot-messages' # change this to a proper location

They show you what the error is. Mine was that there was no tmp directory in my askbot directory.

  File "/usr/lib/python2.7/tempfile.py", line 239, in _mkstemp_inner
    fd = _os.open(file, flags, 0600)
OSError: [Errno 2] No such file or directory: '/srv/askbot2/viki/tmp/tmpYMJteQ.upload'

So I made a directory tmp with 777 permissions. This works for me. Now I can upload PDFs with size over 1 MB.