If you can avoid saving images to database then the solution would look
like following where you are serving base64 url of image to reduce your
website data bandwidth:
1. from django.db import models
2. class Photo( models.Model ):
3. title = models.CharField( max_length=255 )
4. imag
You don't show where the 'Image' object comes from (in Image.open), so I
can't be specific, but here are some generalities:
"Incorrect padding" is probably a message from the base 64 decoder.
Capture your request.POST[photo] to play with separately. If you are doing
this under the development ser
Hello all,
I am trying to save base64 string string image to database but I am not
able to store. I am beginner for python django language.
I am following these steps:--
from base64 import b64decode
from django.core.files.base import ContentFile
from time import time
import cStringIO
import bas
3 matches
Mail list logo