﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32452	Simplify storing strings/bytes in a Storage	Thomas Güttler	nobody	"Docs: https://docs.djangoproject.com/en/3.1/topics/files/#storage-objects

> path = default_storage.save('path/to/file', ContentFile(b'new content'))

Things would be bit easier, if `save()` would support strings/bytes directly.

This way a developer needs to type and import less code:

{{{
path = default_storage.save('path/to/file', b'new content')
}}}

{{{
path = default_storage.save('path/to/file', 'new unicode string, encoded automatically with utf-8')
}}}

Would you accept a patch to `Storage.save()`?

Background: I am writing a unittest which mocked away the storage calls to save() will put the data into the mock.

Then I check if the data is the way I want it.

Now it gets complicated again: I need to access the data which is inside `ContentFile` grrr.

This would be much easier if you could add strings/bytes to the `save()` directly."	New feature	closed	File uploads/storage	3.1	Normal	wontfix			Unreviewed	0	0	0	0	0	0
