Content tagged with "upload"

Django: Private File Upload and Serving

30th September 2010 in Coding

The standard Django FileFields assume you want to upload a file in a subdirectory of MEDIA_ROOT, what if you want to upload the file in a private directory above the web root, not accessible via http?
How can you serve the files then?

continue reading "Django: Private File Upload and Serving"

Django: FileField with ContentType and File Size Validation

24th September 2010 in Coding

Immagine that you need to add the possibility to upload a PDF or Zip file in the django admin, but you want to be sure your client will upload only these two filetypes and not other ones.
You might also need the same functionality in the frontend, so why not use "ModelForm" and have just one validation for both applications (admin and frontend)?

In this short post I'll share with you my simple solution.

continue reading "Django: FileField with ContentType and File Size Validation"

Categories

Let's be social

Popular posts

Latest Comments

  1. Great news Aymará! Very happy to know this post has inspired you to experiment :-)

    By Federico Capoano in First DjangoGirls Rome wrap-up & afterthoughts

  2. Hi!! I'm a Django Girls coach too. Here, in Argentina, made just what you suggested, splited the workshop in two days. The experiment went just great! Most of the girls achieved to publish the blog from ground 0. It feels great to be helpfull ...

    By Aymará in First DjangoGirls Rome wrap-up & afterthoughts

  3. Send any question to the interop-dev mailing list or open an issue on github.

    By Federico in Network Topology Visualizer: django-netjsongraph

  4. I have a question about Network Topology Collector, can you brief me pls?

    By Nasrin Akter in Network Topology Visualizer: django-netjsongraph

  5. Thanks !

    By Alois in How to speed up tests with Django and PostgreSQL

Popular Tags

battlemesh censorship creativity criptography django event google-summer-of-code ibiza inspiration javascript jquery linux nemesisdesign netjson ninux nodeshot open-source openwisp openwrt performance photo programming python security staticgenerator talk upload wireless-community