How safe are directories? And how to create new directories during user registration?

I am creating a video sharing site in django.

Currently, if a user signs up and uploads a video, he will be uploaded to media/vid/uploaded-vid. Then I converted using ffmpeg to flv. What I would like to do is:

Someone with username alex1 , I would like to create a directory for him when he confirms his email called/media/vid/members-vid/alex1

If he uploaded the video, it will be converted to flv in media/vid/uploaded-vidand then copied to /media/vid/members-vid/alex1. And the video media/vid/uploaded-vidshould be deleted.

And I would like to provide /media/vid/. How do you protect django directories? Or is it just apache chmod?

I was wondering if I can use celery / rabbitqm to copy files from one folder to another or to create new folders.

+5
source share
3 answers

. , , (, - , ?), . , , , , , - ext3 32 . .

, 1 9 , , .

, /tmp/upload/1015/, /var/userdata/01/1015/ /var/userdata/01/1015/, , :

  • /tmp/upload/1015/ apache
  • /tmp/upload/1015/ , AMQP, RabbitMQ RPC/-
  • , , db/AMQP/- :
    • , ,
    • ( , , cronjob /tmp/upload, 24 )
    • , /
    • / /

, , , . , apache, apache. , .

, , Flickr ' " " ( ) " -". 2006 , .

+3

- - , . , , , -. (.. ), . - (.. - , ), .

, django + webserver Django. :

+5

Perhaps you should store your videos in mongoDB GridFS or something similar. Thus, you will not have problems with directories, repositories, executable files ...

+1
source

All Articles