Ask Your Question
0

Do I need to configure an upfiles/ directory?

asked 2011-11-16 03:38:50 -0500

Joseph's avatar

The deployment documentation says that I should configure an upfiles/ directory.

However, the askbot nginx deployment instructions don't make any mention of upfiles/

Is this necessary? What is it used for?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-05-14 07:22:29 -0500

joseangel's avatar

You could:

  1. Create a directory in the filesystem for storing the uploaded images. IMHO, this directory should not be inside the askbot/ tree, but in a separate path, as it may grow in the future. However, the default askbot/upfiles should be OK for small sites (no risk of huge disk occupation because of the avatar files).
  2. Configure your web server (Nginx / Apache) to serve statically the contents (avatars). Beware to carefully configure the AVATAR images path and web server urls.
  3. Review the security considerations. I have observed that askbot will store the "raw" image uploaded by the user (eventually a high resolution image), then creating several "thumbnails" of the original with lower pixel count. You should not make available publicly the high resolution (original) image. Maybe I am being picky here, but I think the application should only expose publicly the scaled-down images.
edit flag offensive delete link more
0

answered 2011-11-16 06:34:22 -0500

Evgeny's avatar

updated 2014-05-14 22:51:55 -0500

askbot/upfiles directory is used to save uploaded images, so it needs to be writable by the server process.

An alternative directory path can be specified with the settings.py parameter MEDIA_ROOT.

That nginx doc needs an update, what you would want - is serve files from that directory by the webserver, bypassing python.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2011-11-16 03:38:50 -0500

Seen: 430 times

Last updated: May 14 '14