[DEV] add webp in image data

This commit is contained in:
Edouard DUPIN 2020-01-29 23:02:34 +01:00
parent f49c0be541
commit 7b74dfa2be
4 changed files with 11 additions and 3 deletions

View File

@ -42,7 +42,7 @@
<input type="file"
(change)="onChangeCover($event.target)"
placeholder="Select a cover file"
accept=".png,.jpg"/>{{upload_file_value}}
accept=".png,.jpg,.jpeg,.webp"/>{{upload_file_value}}
</div>
</div>
</div>

View File

@ -42,7 +42,7 @@
<input type="file"
(change)="onChangeCover($event.target)"
placeholder="Select a cover file"
accept=".png,.jpg"/>{{upload_file_value}}
accept=".png,.jpg,.jpeg,.webp"/>{{upload_file_value}}
</div>
</div>
</div>

View File

@ -114,7 +114,7 @@
<input type="file"
(change)="onChangeCover($event.target)"
placeholder="Select a cover file"
accept=".png,.jpg"/>{{upload_file_value}}
accept=".png,.jpg,.jpeg,.webp"/>{{upload_file_value}}
</div>
</div>
</div>

View File

@ -201,6 +201,14 @@ export class HttpWrapperService {
//headers.append('Content-Type', "image/jpeg");
headers['Content-Type'] = "image/jpeg";
headers['mime-type'] = "image/jpeg";
} else if (extention == "jpeg") {
//headers.append('Content-Type', "image/jpeg");
headers['Content-Type'] = "image/jpeg";
headers['mime-type'] = "image/jpeg";
} else if (extention == "webp") {
//headers.append('Content-Type', "image/webp");
headers['Content-Type'] = "image/webp";
headers['mime-type'] = "image/webp";
} else if (extention == "png") {
//headers.append('Content-Type', "image/png");
headers['Content-Type'] = "image/png";