What do you want to save?
Add Code snippet
New code examples
-
Python 2022-01-23 06:40:49
flask decoding base 64 image
from PIL import Image from io import BytesIO import base64 data['img'] = '''R0lGODlhDwAPAKECAAAAzMzM/////wAAACwAAAAADwAPAAACIISPeQHsrZ5ModrLl N48CXF8m2iQ3YmmKqVlRtW4MLwWACH+H09wdGltaXplZCBieSBVbGVhZCBTbWFydFNhdmVyIQAAOw==''' im = Image.open(BytesIO(bas... Add solution -
Python 2021-11-17 04:16:18
django file field from base64
import base64 from django.core.files.base import ContentFile format, imgstr = data.split(';base64,') ext = format.split('/')[-1] data = ContentFile(base64.b64decode(imgstr), name='temp.' + ext) # You can save this as file instance. Add solution -
Python 2021-11-10 01:32:20
decode base64 password python
import base64 msg = base64.b64decode(msg) Add solution -
Python 2021-09-29 19:45:04
hide password in python
#https://docs.python.org/3/library/base64.html >>> import base64 >>> print(base64.b64encode("password".encode("utf-8"))) cGFzc3dvcmQ= >>> print(base64.b64decode("cGFzc3dvcmQ=").decode("utf-8&... Add solution
Best helpers
Ranking is empty