You can use database to store the location of the file on server , not the
file itself..

Checkout in Documentation

models.ImageField()
models.FileField()

On Tue, 4 Aug 2020, 9:01 pm را نيا, <raniachett...@gmail.com> wrote:

> Good evening
> I want to import photos and PDF files from desktop app and display them in
> web app, how can I do it without using binary format?
>
> Le jeudi 4 janvier 2018 10:44:53 UTC+1, Shem Ogumbe a écrit :
>>
>> Maybe try the conversion then save the path to MongoDb, but not the
>> bytsetring itself
>>
>> On Wednesday, January 3, 2018 at 3:03:36 PM UTC+3, chern...@gmail.com
>> wrote:
>>>
>>> What field should i use to store byte string so that i can later use it
>>> for ByteIO to convert it into image ?
>>>
>>> As this is my first time doing on byte string to image, i am pretty lost
>>> on what i need to do.
>>>
>>> I tried using BinaryField for the image model but when checking the
>>> field out on Django admin, it gave me this error
>>> 'image' cannot be specified for MyUser model form as it is a
>>> non-editable field
>>> i also tried setting BinaryField(editable=True) but it still doesnt work.
>>>
>>> May i have some guidance on how to store the byte string ?
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/348196d3-9529-4fdc-8686-fb9b375fdbd6o%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/348196d3-9529-4fdc-8686-fb9b375fdbd6o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHV4E-f88hk8h4B96NQHAwuac%3DXH1UHHKkkYTqzFXTi2k7Dipg%40mail.gmail.com.

Reply via email to