Deleting file via API doesn't work

Duplicate from #3422.

What were you doing?

  1. Deleting (gcode) file via API
  2. Get files in location

What did you expect to happen?

The deleted file should have been disappeared.

What happened instead?

The deleted file was still there after deleting some files.
Deleting got me a status 204 - No Content, deleting again 404 - Not found. However it is still there when querying with GET api/files

Did the same happen when running OctoPrint in safe mode?


Version of OctoPrint


Operating System running OctoPrint


Link to octoprint.log

~Unfortunately the logs are outdated. The last ones are from 2019-09-26.~
Update: My date/time on the raspberry was configured wrong. Here is a link to the log file.

Same applies to creating a folder. It is shown correctly in the octoprint interface but not in the API call. I assume that there might be a problem with the GET api/files request.

Is the file actually still there, or does the /api/files request somehow get cached?

It is gone. But I'm unable to retrieve an uncached version. I think it is cached server-side.

Moving this to the ticket to not have to discuss this in two places: