Delete media from drone

I’m trying to find a way to delete media saved on the drone’s SD card from either the SDK or a URL request. I’m using the method listed here for accessing a listing of available media on the drone and determining a URL for downloading the picture: Downloading media from Drone through SkyControlller RNDIS

I can’t find anything listed in the SDK for interacting with media this way. Is there something available that I have missed or a request similar to the one in the post above (for accessing media) that could be used to delete individual photos or videos?

Hi

You can list available medias using: REST/JSON media API http://192.168.42.1/api/v1/media/medias for a physical drone and http://10.202.0.1/api/v1/media/medias for a simulated drone.

This API endpoint returns a JSON data structure which is a list of media that might look like this:

[
  {
    "media_id": "10000001",
    "type": "PHOTO",
    "datetime": "19700101T000949+0000",
    "size": 4338126,
    "run_id": "D42C35807315EDB8893F0C577975D02E",
    "thumbnail": "/data/thumbnails/100000010001.JPG",
    "resources": [
      {
        "media_id": "10000001",
        "resource_id": "100000010001.JPG",
        "type": "PHOTO",
        "format": "JPG",
        "datetime": "19700101T000949+0000",
        "size": 4338126,
        "url": "/data/media/100000010001.JPG",
        "width": 4608,
        "height": 3456,
        "thumbnail": "/data/thumbnails/100000010001.JPG",
        "md5": ""
      }
    ],
    "photo_mode": "SINGLE" } ]

each media can have multiple resource (when photo_mode=“burst” for example).
To download a media resource, you just have to HTTP GET the resource URL for example:
http://192.168.42.1/data/media/100000010001.JPG
To delete a media resource, just send an HTTP DELETE request to the same resource URL.

The (media) web API documentation should be published by Parrot soon (you are not the only one requesting it).

In the meantime, you can find here a web API usage example using python/requests to download and analyze the metadata of some photo bursts (I hope this might help you getting started).

1 Like