Show all Files of a Folder
Hello everyone,
for our Project I would like to access the Files in a folder associated with the device (e.g Documentation).
For another Project I was already able to display a pdf-File on a button Click. On Click the following code is executed:
$scope.showDoku = function(){
var anchor = document.createElement('a');
anchor.href = 'app/resources/Uploaded/wagoController.pdf';
window.location.href = anchor.href;
};
Now I would like to (if possible) "automatically" generate a List (of Buttons?) based on the content of lets say
'app/resources/Uploaded/DeviceX/'. The List should display the filenames contained in the folder DeviceX. And if possible a "clickable" List. I would simply extend the the code above by adding a parameter with the filename then.
The reason behind this is, that files regarding a Device may be added/deleted and the Buttons/Listelements should be consistent with the foldercontent. The reason for the Project is to avoid all this "file handling" regarding a device. It would be very nice to just "scan" the Code of a device an have all relevant files in one place instead of searching for them.
Any help with this issue is appreciated very much.
Thank you in advance!
Best Regards,
Dominik

