M
M
MalekBV2019-10-22 21:04:41
Django
MalekBV, 2019-10-22 21:04:41

How to add images to a form via the paperclip icon (Django)?

How to use this form (CreateView) to make it so that when you click on the paperclip icon, an overview of the files for uploading the photo opens
5daf44ab84f42215183910.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Neverov, 2019-10-22
@malekBV

<label for="file-input">
  <input id="file-input" name="file" type="file">
</label>

Use CSS to style the label to look like a paperclip. And give input display: none

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question