Questions tagged [django-blob]

Django's modeling system does not provide native support for large binary data. This raises a variety of challenges in situations where people might use the blob sql data structure.

4 questions
37
votes
4 answers

Django Blob Model Field

How do you store a "blob" of binary data using Django's ORM, with a PostgreSQL backend? Yes, I know Django frowns upon that sort of thing, and yes, I know they prefer you use the ImageField or FileField for that, but suffice it to say, that's…
Cerin
  • 60,957
  • 96
  • 316
  • 522
13
votes
3 answers

django store image in database

Does anyone know if there's an out-of-the box way of storing images directly in the database vs. using ImageField model type that simply uploads it to the MEDIA_ROOT. And if there is, how does one serve those images then? Cheers
Rok
  • 1,482
  • 3
  • 18
  • 37
10
votes
2 answers

Django Binary or BLOB model field

I have a C# program that inserts a pdf inside a MySQL database. Now I want to retrieve that pdf via django but django's models.FileField needs an "Upload To" parameter which means behind the scenes it actually stores the File on the file system…
RaVen
  • 775
  • 2
  • 8
  • 21
2
votes
3 answers

Django models "blob" field

I want to create a table like so - CREATE TABLE trial_xml ( id int(11) DEFAULT NULL, pid int(11) DEFAULT NULL, sid varchar(256) CHARACTER SET utf8 NOT NULL, data blob, PRIMARY KEY (soid), KEY suid_index (suid) ) ENGINE=MyISAM DEFAULT…
Srikar Appalaraju
  • 71,928
  • 54
  • 216
  • 264