SafeHealth Docs
Media
Media
Visit Media on GitHub
Set theme to dark (⇧+D)

Management

Create, Update, and Delete Media

​​ Create Media

Any request to store media (i.e., add it to the SafeCDx platform) is completed in two parts. When a request is initiated through a create media request, the following actions are performed:

  • The information is validated for necessary elements to be present in the request
  • After passing validation, an upload URL is created and populated on the response to be returned.
  • The create request status is updated with MEDIA_STATUS_CREATING before being returned to the client.

The response can be read by the client, and the upload URL should be directly used by any client to upload the relevant media content. This approach allows SafeCDx to keep the media create requests as instantaneous as possible, and it enables the use of short lived signed URLs that can be used to upload the content. This separation between the (1) media create request and (2) the actual media content upload allows the request to be validated and authenticated. As a result, only valid requests to eventually use a direct upload feature will be allowed, reducing the overall stress on the network bandwidth in the SafeCDx platform.

​​ Update Media

These are requests that can be performed to update the attributes of the already uploaded media.

​​ Delete Media

These are requests that can be performed to delete or archive the already uploaded media.