Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
1. Update addPhoto
2. Fix deleteFolder alert
3. Change placeholder class names
  • Loading branch information
helamanl0424 authored Apr 2, 2024
1 parent 891ea37 commit 701dfcf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions samples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ function addPhotoAction() {
const input = document.createElement('input');
input.type = 'text';
input.id = 'folderNameInput';
input.className = 'searchInput';
input.className = 'addPhotoInput';
input.placeholder = 'Enter file URL';
input.style.width = '150px';

Expand Down Expand Up @@ -301,7 +301,7 @@ function addFolderAction() {
const input = document.createElement('input');
input.type = 'text';
input.id = 'folderNameInput';
input.className = 'searchInput';
input.className = 'addFolderInput';
input.placeholder = 'Enter folder name';
input.style.width = '150px';

Expand Down Expand Up @@ -332,7 +332,7 @@ function addFolderAction() {
async function deleteFolderAction() {
try {
const listEvent = `${getPicoURL()}1556/sample_app/ls?fileURL=${getCurrentPath()}`;
if (getCurrentPath() == '') {
if (getCurrentPath() == storageURL) {
alert('You cannot delete the root folder!');
return;
}
Expand Down Expand Up @@ -493,7 +493,7 @@ async function prefetchDataURLs(items) {
}

async function addPhoto(url, filename) {
const storeLocation = getCurrentPath();
const storeLocation = getCurrentPath() + filename;
const data = {
fileName: filename,
originURL: url,
Expand Down

0 comments on commit 701dfcf

Please sign in to comment.