简体   繁体   中英

Can i scan the files like normal folder in amazon s3 with django

I have the Django app and i am thinking of using the Amazon S3 for storing 20GB of pdf files.

Now i won't be directly serving them but i am thinking of like this. please give me right direction if something is wrong

  1. Django will scan the all files from S3 and will populate the database tables of all filenames , sizes etc.

  2. Then i will show the list of them om web page so that i can track the how many times the file is downloaded

  3. Then i will serve the file from amazon S3

Is this kind of thing possible

My Django app is using apache , mod_wsgi and VPS server Centos 6

Yes, this should be possible (and is in fact a good way to go). You can use the boto library to scan your directory on S3 to store it in your database. With this information you can generate download links for the files. It is also possible to automatically let the download links from S3 expire after a certain amount of time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM