我有在发布到API之前在内存中存储图像的工作代码。但是,将文件加载到内存可能需要一些时间。我需要一种方法来显示文件正在加载。HTML:
<input class="input-dnld" id="loadImg" type='file' placeholder="Select an image to upload"
settings.MEDIA_ROOT) forms.py class imguploadform(forms.ModelForm): model = imguploadfields = ['title', 'image'] models.py class imgupload(models.Model):