django-imagefield icon indicating copy to clipboard operation
django-imagefield copied to clipboard

Request: preview selected file.

Open jmdiazlr opened this issue 5 years ago • 1 comments

Thanks for this nice module. It could be awesome if the selected file is previewed after selection and before save.

jmdiazlr avatar Oct 29 '20 00:10 jmdiazlr

This is an excellent idea!

  • The implementation would probably belong into the PPOIAndPreviewMixin and in ppoi.js, even when not using the PPOI widget. (We could also rename the JS file.)
  • This return should be removed, we need .imagefield elements added below https://github.com/matthiask/django-imagefield/blob/8f537dd6059a9ad6cebf23de63c8a1c32e9491a3/imagefield/widgets.py#L39-L40
  • A good way to add an empty image element seems to be src="data:, according to https://stackoverflow.com/questions/5775469/whats-the-valid-way-to-include-an-image-with-no-src

matthiask avatar Oct 29 '20 08:10 matthiask