Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane committed Jul 25, 2024
1 parent a311064 commit 263523c
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/components/DriveView/Media.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -351,13 +351,8 @@ class Media extends Component {

const urls = await Promise.all(url_promises);
if (urls) {
let fileNames = Array(paths.length).fill(fileName);
console.log('123. fileNames', fileNames)
console.log('123. paths', paths)
console.log('123. urls', urls)
this.props.dispatch(doUpload(dongleId, paths, urls));
}

}

async uploadFilesAll(types) {
Expand Down Expand Up @@ -389,17 +384,10 @@ class Media extends Component {
}
this.props.dispatch(updateFiles(uploading));

// const paths = Object.keys(uploading).map((fileName) => {
// const [seg, type] = fileName.split('/');
// console.log('returning', `${seg.split('|')[1]}/${FILE_NAMES[type]}`)
// return `${seg.split('|')[1]}/${FILE_NAMES[type]}`;
// });

const paths = Object.keys(uploading).flatMap((fileName) => {
const [seg, type] = fileName.split('/');
return FILE_NAMES[type].map(file => `${seg.split('|')[1]}/${file}`);
});
console.log('paths v2', paths)

const urls = await fetchUploadUrls(dongleId, paths);
if (urls) {
Expand Down Expand Up @@ -801,7 +789,6 @@ class Media extends Component {
renderUploadMenuItem([file, name, type]) {
const { device, classes, files, profile } = this.props;
const { windowWidth } = this.state;
console.log('file', file, 'name', name, 'type', type)

const canUpload = device.is_owner || (profile && profile.superuser);
const uploadButtonWidth = windowWidth < 425 ? 80 : 120;
Expand Down

0 comments on commit 263523c

Please sign in to comment.