Browse Source

fix file extension

pull/105/head
Trent Larson 6 months ago
parent
commit
49bb1c07b7
  1. 4
      src/views/GiftedPhoto.vue

4
src/views/GiftedPhoto.vue

@ -104,7 +104,7 @@ export default class GiftedPhoto extends Vue {
async takeImage(/* payload: MouseEvent */) {
const cameraComponent = this.$refs.camera as InstanceType<typeof Camera>;
this.blob = await cameraComponent?.snapshot();
this.blob = await cameraComponent?.snapshot(); // png is default; if that changes, change extension in formData.append
if (!this.blob) {
this.$notify(
{
@ -145,7 +145,7 @@ export default class GiftedPhoto extends Vue {
this.uploading = false;
return;
}
formData.append("image", this.blob, "snapshot.jpg");
formData.append("image", this.blob, "snapshot.png");
formData.append("claimType", "GiveAction");
try {
const response = await axios.post(

Loading…
Cancel
Save