You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The buildFilesTree function is working ; it builds a map for each folder that can contain other maps (sub-folders) or files (the audio files). However, I'm note sure this is the better way of doing it.
The goal of this function is to build a tree to retrieve the hierarchical structure of the uploaded content, because when uploading a folder from a file input (with webkitdirectory tag), we only get the files and not the folders, but we can retrieve them via the webkitRelativePath property of each file.
This tree structure is important ; it is used to add the folders and audio files to the zip file (generated application) and to build the HTML tree to display the audio files.
So, is there a better way of building the tree structure ? Or maybe another way of uploading the files, or by using another data container for the folders and files than the Map. This is important to use as less libraries as possible and to do the maximum with vanilla Javascript.
The buildFilesTree function is working ; it builds a map for each folder that can contain other maps (sub-folders) or files (the audio files). However, I'm note sure this is the better way of doing it.
The goal of this function is to build a tree to retrieve the hierarchical structure of the uploaded content, because when uploading a folder from a file input (with webkitdirectory tag), we only get the files and not the folders, but we can retrieve them via the webkitRelativePath property of each file.
This tree structure is important ; it is used to add the folders and audio files to the zip file (generated application) and to build the HTML tree to display the audio files.
So, is there a better way of building the tree structure ? Or maybe another way of uploading the files, or by using another data container for the folders and files than the Map. This is important to use as less libraries as possible and to do the maximum with vanilla Javascript.
pwa-playlist-generator/app/js/app.js
Lines 59 to 96 in f8523cf
A test example result :
The text was updated successfully, but these errors were encountered: