Skip to content

Commit

Permalink
Change input field names
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrumpis committed Mar 15, 2024
1 parent e1d9e6f commit 32963d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ <h3>Upload and Import Snap Lenses</h3>
<div class="upload-group row justify-content-sm-center mb-3">
<div class="col-xs-auto col-sm-6 col-md-4 col-lg-3">
<div class="form-group mb-1">
<input type="file" class="form-control" name="lens[]" accept=".lns" required>
<input type="file" class="form-control" name="file[]" accept=".lns" required>
</div>
<div class="form-group mb-1">
<input type="text" class="form-control" name="id[]" placeholder="Lens ID or Lens Share URL" required>
Expand Down
3 changes: 1 addition & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ startLensUpload.addEventListener("click", function (e) {
if (lensId) {
lensUploadForm.append('id[]', lensId);
} else if (isValidUrl(inputVal)) {
lensUploadForm.append('url[]', inputVal);
lensUploadForm.append('id[]', inputVal);
} else {
error(`Error: "${inputVal}" is neither a valid Lens ID nor a share URL.`);
isErrorOccurred = true;
Expand All @@ -209,7 +209,6 @@ startLensUpload.addEventListener("click", function (e) {
if (!isErrorOccurred) {
importFiles(importLensApiPath, lensUploadForm);
}

});

document.addEventListener("DOMContentLoaded", function () {
Expand Down

0 comments on commit 32963d9

Please sign in to comment.