# Cloud Media Sync

## Private Cloud Storage

FlytBase allows the operator to integrate their own private cloud storage for archiving drone videos and images. FlytBase does not maintain any copies of the user's drone videos to ensure privacy. To save and replay videos and images the operator has to set up either an AWS S3 bucket or a Microsoft Azure Blob.&#x20;

{% tabs %}
{% tab title="AWS S3 Setup" %}

## For setting up AWS S3

* Sign in to AWS Account here: [<mark style="color:blue;">https://aws.amazon.com/</mark>](https://aws.amazon.com/)<mark style="color:green;">.</mark> Click on **Create an Account** if there isn't one.
* Go to the **Bucket** Tab in the Amazon S3 console. Click on **Create Bucket** to create a bucket in the preferred region.

<figure><img src="https://2978718896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGYYKeStDMySe3v9HDpIo%2Fuploads%2F7hsMV6Lb8gMAlKdCfk8o%2Fcreatebucket.png?alt=media&#x26;token=04fe8d51-58d7-4bc3-a287-30e43b006bf0" alt=""><figcaption><p>Amazon S3 Console</p></figcaption></figure>

* **Enable the ACLs** and select the object ownership to **Bucket owner preferred**.

<figure><img src="https://2978718896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGYYKeStDMySe3v9HDpIo%2Fuploads%2FPm5s8BoeBOwOfgMN4ZXJ%2Fimage.png?alt=media&#x26;token=52c4e924-f873-42a2-ae99-c2d87c7814eb" alt=""><figcaption><p>Name the Bucket, select AWS region and configure Object Ownership</p></figcaption></figure>

* Next, ensure that **block all public access** is set to **OFF**.

<figure><img src="https://2978718896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGYYKeStDMySe3v9HDpIo%2Fuploads%2Fgtd9jvS2I9R8mawoFcs7%2Fimage.png?alt=media&#x26;token=03f2273c-16ad-4635-b408-02df7f0aef41" alt=""><figcaption><p>Turn off block all public access</p></figcaption></figure>

* Ensure that **Bucket Versioning** is **Disabled**.

<figure><img src="https://2978718896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGYYKeStDMySe3v9HDpIo%2Fuploads%2Fm0IyOPNKCQcAm6WHEqb8%2FConfigure%20Bucket%20Versioning.jpg?alt=media&#x26;token=c09788bd-46d5-4c36-9396-dfa686b145a1" alt=""><figcaption><p>Configure Bucket Versioning</p></figcaption></figure>

* Configure the **Default Encryption.** Set the Encryption type to **Server-side encryption with Amazon S3 managed keys (SSE-S3)** and Bucket Key to **Enable.**&#x20;

<figure><img src="https://2978718896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGYYKeStDMySe3v9HDpIo%2Fuploads%2F9T8920nINMj0t3gXCD3m%2FConfigure%20default%20encryption.png?alt=media&#x26;token=dd5a1eb1-d677-493c-acb8-ed9688e2abac" alt=""><figcaption><p>Configure Encryption and Bucket Key</p></figcaption></figure>

* Now click on **Create bucket**.

Once the organizer has successfully created the bucket, go to **Bucket Name> Properties > Enable Transfer acceleration**.

<figure><img src="https://2978718896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGYYKeStDMySe3v9HDpIo%2Fuploads%2FvkU8fTMySO99tPn9KHoi%2Fimage.png?alt=media&#x26;token=7e1a6206-d079-4ed9-868e-5c7430125f39" alt=""><figcaption><p>Enable transfer acceleration</p></figcaption></figure>

* Now go to **Bucket Name > Permissions > Bucket Policy**. Paste the following JSON and replace the **Bucket\_Name** with the actual name of the bucket.

```
{
    "Version": "2012-10-17",
    "Id": "Policy1586431420805",
    "Statement": [{
        "Sid": "Stmt1586431413927",
        "Effect": "Allow",
        "Principal": {
            "AWS": "arn:aws:iam::338532100127:user/S3-FlytNow"
        },
        "Action": "*",
        "Resource": [
            "arn:aws:s3:::Bucket_Name",
            "arn:aws:s3:::Bucket_Name/*"
        ]
    }]
}
```

<figure><img src="https://2978718896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGYYKeStDMySe3v9HDpIo%2Fuploads%2FPohFXmBwDq4B4zM3ygZD%2Fimage.png?alt=media&#x26;token=e587f39e-8b6b-4927-b28c-fb8c73d47d11" alt=""><figcaption><p>Update the Bucket Policy</p></figcaption></figure>

* Finally, proceed to **Bucket Name > Permissions > CORS Configuration**. Paste the following array to update the **CORS configuration**.

```
[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "GET"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": [],
        "MaxAgeSeconds": 1800
    }
]
```

<figure><img src="https://2978718896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGYYKeStDMySe3v9HDpIo%2Fuploads%2Fj7En3NOOXp5Cfyd8E1Mj%2Fimage.png?alt=media&#x26;token=46ec0e24-6e53-420a-8aea-5b3ac6aecc86" alt=""><figcaption><p>Updating the CORS configuration</p></figcaption></figure>

{% hint style="success" %}
Once completed, please send the **S3 Bucket Name** with the **AWS region** over email to <mark style="color:blue;"><support@flytbase.com></mark>.
{% endhint %}
{% endtab %}
{% endtabs %}

## Overview

The archived data can be stored, organized, and shared across various stakeholders directly from the FlytBase Dashboard to increase operational efficiency and situational awareness. The operator can upload high-resolution images/videos captured in the drone's SD card to a pre-configured AWS S3 (Private cloud storage).

{% hint style="info" %}
To get started with this feature, please make sure to:&#x20;

* Have a pre-configured [<mark style="color:blue;">AWS S3 cloud storage</mark> ](#aws-s3-setup)
* Media storage location on the FlytNow Mobile application is set to **SD card**
  {% endhint %}

{% hint style="info" %}
Supported file formats for Cloud Media Sync are:

* Images: JPEG, RAW, JPEG+RAW
* Videos: MP4/MOV (H.264 Video Encoding)
  {% endhint %}

Using Cloud Media Sync operators have the ability to upload, view, play, and download high-resolution archived media directly from their drones. This feature provides an efficient way for operators to manage and share drone data captured during flights with their organization and other stakeholders. Users can search for media by categories such as all media, videos, and images, by the drone's vehicle ID, making it easier to find and organize specific data.

{% embed url="<https://www.youtube.com/watch?v=-lhHjOk9ThY>" %}

## Uploading Archived Data to Cloud Storage

* Navigate to the navigation drawer and under the Logs![](https://2978718896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGYYKeStDMySe3v9HDpIo%2Fuploads%2FjqXylTUOHPFVPaWJHd2P%2FOperations%20icon%20\(1\).png?alt=media\&token=06614d8c-b830-4644-b941-3c9e20996164)section select **Gallery**.

<figure><img src="https://2978718896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGYYKeStDMySe3v9HDpIo%2Fuploads%2FUfU1uUbp1IzWiKcKaQL5%2Fimage.png?alt=media&#x26;token=d043d6dd-cd54-4b08-aabb-4e676a47b73b" alt=""><figcaption><p>Navigation Drawer: Gallery</p></figcaption></figure>

* To view the contents of the drone's SD card, simply click on the **Cloud Sync**![](https://2978718896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGYYKeStDMySe3v9HDpIo%2Fuploads%2FMntNij1UTlnFhlngR5tr%2FFrame%202609581.png?alt=media\&token=81d2e416-cc36-4f60-b315-a96003bdd5a6)icon. This action will initiate the Cloud backup, and the operator will be able to access the backed-up data.

<figure><img src="https://2978718896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGYYKeStDMySe3v9HDpIo%2Fuploads%2FuQIBfcbj9qfmGR20Oxx6%2Fimage.png?alt=media&#x26;token=3d8cebd4-fef4-4aa1-8b8c-a6e92b7f908e" alt=""><figcaption><p>Cloud Synchronization button</p></figcaption></figure>

* To back up the data, click on the **Back up now** button

{% hint style="info" %}
To initiate the Cloud Media Sync the registered drone must be online in the FlytBase Dashboard
{% endhint %}

<figure><img src="https://2978718896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGYYKeStDMySe3v9HDpIo%2Fuploads%2FxvfKgj6QmZQvw6PBGPK4%2Fimage.png?alt=media&#x26;token=d006d72f-8179-46c5-b289-2809dd2fb5a1" alt=""><figcaption><p>Back up Drone Media</p></figcaption></figure>

* A **Create new folder** dialogue box will pop up to create a folder for storing the backup media of the drone.

<figure><img src="https://2978718896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGYYKeStDMySe3v9HDpIo%2Fuploads%2FBc5UAm9aMsSVFuEaAbvx%2Fimage.png?alt=media&#x26;token=ab094df0-3b06-4293-a4ef-b451202ca5d5" alt=""><figcaption><p>Creating a new folder in cloud for storing the media</p></figcaption></figure>

* **Cloud Media Sync Progress Bar Parameters**: The FlytBase Dashboard displays a progress bar displaying the download and upload speeds.
  * **Downloading to Edge Device:** This progress bar displays the estimated time to download the SD card contents to the Edge Device ( Android Smartphone/Android Tablet/ Odroid N2+). The download speed depends on:
    * Strength of the RF connection between the drone and its remote controller.
    * The distance between the drone and its remote controller.
    * Electromagnetic Interference between the drone and its remote controller.
  * **Uploading to Cloud:** This progress bar displays the estimated time to upload the SD card contents from the Edge Device ( Android Smartphone/Android Smartphone/ Odroid N2+) to the Cloud. The upload speed depends on the internet connection on the Edge Device (Android Smartphone/Android Tablet/ Odroid N2+)

{% hint style="danger" %}
If the drone goes offline and then comes back online during the Cloud Sync, the Cloud Sync is resumed. A few archived images/videos, however, may not be uploaded. In this scenario, the operator will need to restart the backup.
{% endhint %}

<figure><img src="https://2978718896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGYYKeStDMySe3v9HDpIo%2Fuploads%2FVOOk2sSbfPiP5Y3KGVe1%2Fimage.png?alt=media&#x26;token=e75c3226-2c8a-48ca-8c89-4cc7c8da40f8" alt=""><figcaption><p>Cloud Media Sync Progress Bar</p></figcaption></figure>

### Managing Uploaded Media and SD card contents

* Once the media has been successfully uploaded to the cloud, the operator can view and manage their data.
* The operator also has the flexibility to erase and format their SD card once the Cloud Sync is successful

<figure><img src="https://2978718896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGYYKeStDMySe3v9HDpIo%2Fuploads%2F04RvV4Eysb2VIgihmxhM%2Fimage.png?alt=media&#x26;token=d04c67f9-2d1e-460f-a3c7-25c6f328151c" alt=""><figcaption><p>Cloud Sync Successful</p></figcaption></figure>

* To manage the SD card contents, the operator can also click on **Manage Storage** in the Cloud Sync dialogue box to view the available storage space, space occupied by Videos, Photos, and other data on their SD card, and format the SD card if required.&#x20;
