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?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Joseph's avatar
353
Joseph
asked 13 years ago

Comments

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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
joseangel's avatar
11
joseangel
answered 10 years ago
link

Comments

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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
updated 13 years ago, updated 10 years ago
link

Comments

see more comments