Browse Source

fix file extension

photo-upload
Trent Larson 8 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 */) { async takeImage(/* payload: MouseEvent */) {
const cameraComponent = this.$refs.camera as InstanceType<typeof Camera>; 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) { if (!this.blob) {
this.$notify( this.$notify(
{ {
@ -145,7 +145,7 @@ export default class GiftedPhoto extends Vue {
this.uploading = false; this.uploading = false;
return; return;
} }
formData.append("image", this.blob, "snapshot.jpg"); formData.append("image", this.blob, "snapshot.png");
formData.append("claimType", "GiveAction"); formData.append("claimType", "GiveAction");
try { try {
const response = await axios.post( const response = await axios.post(

Loading…
Cancel
Save