How does one remove a file from a FlashAir card using the API?

365 Views Asked by At

On the basis of the documentation for command.cgi and upload.cgi, I have a simple sync application that first retrieves a list of files and then tries to delete them from the device.

However, the delete operation always fails with a 404 error.

The request being issued is like

GET /upload.cgi?DEL=/DCIM/109___06/IMG_0611.JPG HTTP/1.1
Host: 192.168.0.1
User-Agent: ...

The file given as argument to DEL certainly exists on the device since the value is taken directly from a file list response immediately prior.

The full response from the FlashAir API is:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD><TITLE>404 Not Found</TITLE></HEAD>
<BODY><H1>404 Not Found</H1>
The requested URL was not found on this server.
</BODY></HTML>
1

There are 1 best solutions below

2
tell k On

Does http://192.168.0.1/upload.cgi certainly exist? Since 404 Not Found is displayed, there is a possibility that you can not access the API URL in the first place.