fix non-resized images
This commit is contained in:
@@ -28,8 +28,8 @@ class GenerateForm(forms.Form):
|
|||||||
urlLink = forms.CharField(label="Custom URL for links", required=False)
|
urlLink = forms.CharField(label="Custom URL for links", required=False)
|
||||||
|
|
||||||
#Visual
|
#Visual
|
||||||
iconfile = forms.FileField(label="Custom App Icon (in .png format)", required=False)
|
iconfile = forms.FileField(label="Custom App Icon (in .png format)", required=False, widget=forms.FileInput(attrs={'accept': 'image/png'}))
|
||||||
logofile = forms.FileField(label="Custom App Logo (in .png format)", required=False)
|
logofile = forms.FileField(label="Custom App Logo (in .png format)", required=False, widget=forms.FileInput(attrs={'accept': 'image/png'}))
|
||||||
theme = forms.ChoiceField(choices=[
|
theme = forms.ChoiceField(choices=[
|
||||||
('light', 'Light'),
|
('light', 'Light'),
|
||||||
('dark', 'Dark'),
|
('dark', 'Dark'),
|
||||||
|
|||||||
@@ -226,7 +226,6 @@ def update_github_run(request):
|
|||||||
return HttpResponse('')
|
return HttpResponse('')
|
||||||
|
|
||||||
def resize_and_encode_icon(imagefile):
|
def resize_and_encode_icon(imagefile):
|
||||||
print(imagefile)
|
|
||||||
try:
|
try:
|
||||||
with io.BytesIO() as image_buffer:
|
with io.BytesIO() as image_buffer:
|
||||||
for chunk in imagefile.chunks():
|
for chunk in imagefile.chunks():
|
||||||
|
|||||||
Reference in New Issue
Block a user