First time here? Check out the FAQ!
0

Do I need to configure an upfiles/ directory?

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?

Joseph's avatar
353
Joseph
asked 2011-11-16 03:38:50 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

1

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.
joseangel's avatar
11
joseangel
answered 2014-05-14 07:22:29 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

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.

Evgeny's avatar
13.2k
Evgeny
updated 2011-11-16 06:35:29 -0500, updated 2014-05-14 22:51:55 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments