nagasurendra commited on
Commit
c84554e
·
verified ·
1 Parent(s): 67111f2

Update static/js/script.js

Browse files
Files changed (1) hide show
  1. static/js/script.js +5 -5
static/js/script.js CHANGED
@@ -65,7 +65,7 @@ $(document).ready(function() {
65
  startCamera(cameraSelect.value);
66
  });
67
 
68
- // Upload to Instagram
69
  $('#uploadButton').click(function() {
70
  if (!currentImageUrl) {
71
  alert('No image to upload.');
@@ -73,20 +73,20 @@ $(document).ready(function() {
73
  }
74
  $.ajax({
75
  type: 'POST',
76
- url: '/upload_instagram',
77
  data: { image_url: currentImageUrl },
78
  success: function(response) {
79
  if (response.status === 'success') {
80
- alert('Image uploaded to Instagram successfully!');
81
  actionButtons.style.display = 'none';
82
  capturedImage.style.display = 'none';
83
  hfResult.textContent = '';
84
  } else {
85
- alert('Error uploading to Instagram: ' + response.message);
86
  }
87
  },
88
  error: function() {
89
- alert('Failed to upload image to Instagram.');
90
  }
91
  });
92
  });
 
65
  startCamera(cameraSelect.value);
66
  });
67
 
68
+ // Upload to Zapier
69
  $('#uploadButton').click(function() {
70
  if (!currentImageUrl) {
71
  alert('No image to upload.');
 
73
  }
74
  $.ajax({
75
  type: 'POST',
76
+ url: '/upload_zapier',
77
  data: { image_url: currentImageUrl },
78
  success: function(response) {
79
  if (response.status === 'success') {
80
+ alert('Image sent to Zapier successfully!');
81
  actionButtons.style.display = 'none';
82
  capturedImage.style.display = 'none';
83
  hfResult.textContent = '';
84
  } else {
85
+ alert('Error sending to Zapier: ' + response.message);
86
  }
87
  },
88
  error: function() {
89
+ alert('Failed to send image to Zapier.');
90
  }
91
  });
92
  });