Image Upload

From BrAPI-Wiki
Jump to navigation Jump to search

Example Use Case #1

Uploading images from the field to the database

  1. An Image is taken of a specific plot in the field. This records both the image metadata and image binary to the local device.
  2. “POST /images” is used to send the metadata to the server (name, size, file type, observationUnitDbId of the plot, etc)
    • The server responds with an ImageDbId generated to represent that image
  3. “PUT /images/{imageDbId}/imagecontent” is used to upload the image binary file
    • The server may alter the metadata based on the size/name/file-type of the real image
    • The server will respond with the updated metadata, including a new “imageURL” if the image file is now available on a file server somewhere
  4. Some time and data collection occurs. Observations are made on the plot based on the image
  5. “PUT /images/{imageDbId}” is used to update the image metadata. For example, the image could be renamed or a new Observation will be linked to it.
    • The server will respond with the updated metadata