What is the problem?
In a specific subfolder under the local folder, I use the API to read the list of files from the server, but the server responds only to the list at first startup (boot), not the refreshed list.
I am using OctoDash by selecting gcode from the file menu. To use a USB memory stick, I installed usbmount and set the "uploads/STICK" folder as the mount point. I checked that the gcode files in the USB memory mounted using SSH are read normally.
However, when I remove or insert a USB memory stick and check the file list of OctoDash, it does not refresh normally. I created a folder called "ROOM" in the uploads folder for confirmation, and it is the same when requesting a file list with an API request. In the Web UI, the file list is displayed normally using the refresh button.
Reproduction process
-
create "ROOM" folder, add three gcodes and restart OctoPrint
-
API requests using Edge's Devtool
-
Delete one gcode file via web ui
-
API request using Edge's Devtool to read a list of files
Include recursive=true&force=true key
Not include recursive=true&force=true key
List of files with deleted gcode responsed -
Add two gcode file to "ROOM" folder
-
API request using Edge's Devtool to read a list of files
Not a list of 4 files, but a list of files not updated (3) responses -
When I make an API request with /api/files?recursive=true&force=true, it responds with a list of 4 gcode files.
If I use the octoprint web ui, there is no problem because the web ui gets the entire list of folders and files every time I refresh (api/files?recursive=true&force=true). But when I use octodash, it requests list of files by specific folder via API "api/files/local/ROOM". When reading the list of files by specific folder like this, it seems to only receive the list when the octoprint server first boots, which is not updated.
Am I using the wrong API request format? Is there a specific format that makes an API request to get a list of files by directly examining a specific folder, such as a subfolder?
What did you already try to solve it?
- Include recursive=true and force=true keys in API request
- Tried mounting the usb memory stick to an arbitrary watched folder - I confirmed that it was automatically moved to the uploads folder, but it seems to be a problem because all gcode files stored in the usb memory are moved instead of selecting a specific gcode file.
Have you tried running in safe mode?
Yes, there is not much difference.
Did running in safe mode solve the problem?
No
Additional information about your setup
OctoPrint 1.8.6
OctoPi 0.18.0
OctoDash 2.3.1
Raspberry Pi 3 Model B Rev 1.2
Windows 10
Edge Web Browser
Installed Plugin: DisplayLayerProgress Plugin, FileManager, OctoDash Companion, Preheat Button, PrintTimeGenius Plugin, Slicer Thumbnails