I have this model:
class uploadImage(models.Model):
postImage = models.ImageField(upload_to=get_postImage_path, blank=True, null=True)
and I created a form for this model. I passed the form as 'imageForm' to my template. This is my template:
<form enctype="multipart/form-data" id='imageForm' method="post" action="/uploadImage/">{% csrf_token %}
{{ imageForm.postImage }}
<input type='submit' value='upload' />
</form>
Now when I go to this template page from my browser, there is a button which says 'choose file' and beside that button, it says 'no file chosen'. After the user clicks 'choose file' and chooses a file, the 'no file chosen' text changes to the file name.
How do I make the button say 'Upload Image' rather than 'Choose file' and make the 'No file chosen' say 'Image attached' (rather than the file name) once the user chooses an image?