How Mirror storage works
Mirror storage feature provides instant two-way sync between any external cloud storage and the CloudFiles content library. If you wish to get a copy of the latest version of your files inside CloudFiles, you can use the Mirror feature. Mirrored files essentially show a copy of the file present in your cloud based drive directly inside the CloudFiles content library.
This feature is different from importing files into the CloudFiles storage from other cloud storages. When you import files into your CloudFiles library, you basically import files from your local storage or from any of the CloudFiles supported cloud based drives. These imported files do not change when your source file is changed.
Mirrored files can be set to sync: synchronously or manual sync and is available inside native app, HubSpot and Salesforce.
CloudFiles Mirror storage currently supports Microsoft SharePoint, OneDrive, Google Drive, Dropbox & Box Storage. Additionally users can connect their own AWS S3 or Microsoft Azure Blob Storage to get the same experience they get in using the CloudFiles' own storage (which is AWS S3 at the backend). Lastly we also support other storages such as R2 for very large file storage use.
The steps to connect a cloud based drive to CloudFiles for mirroring the content is the same. In this tutorial we'll go through the steps to connect your google drive account for mirroring with CloudFiles.
- Sign into your CloudFiles account and click on the libraries tab.
- Click on the gear icon (⚙️) and ensure that google drive is visible.
- Connect your google drive account. Grant the required permissions. This will mirror your Google Drive library in CloudFiles.
The same steps have to be used if you wish to connect SharePoint, Dropbox, Box or One Drive with CloudFiles.
Now, that your cloud storage has been connected with CloudFiles, you can choose to either sync it (direct serve) or manual sync (sync only when required). Direct serve ensures that your file shows the latest version of your file. However, note that your file loading times will get negatively impacted with direct serve. By default, sharing is set to manual sync.
The sync settings of a file can be accessed from the file details page in the CloudFiles App Dashboard as shown below -
Clicking on sync button in the highlighted area above will sync the latest version of the file from the respective cloud storage onto the CloudFiles public. By default all your links are created with manual sync. This is to ensure that all your files get served within minimum time.
Clicking the serve directly checkbox will enable auto-sync for your file. This means that CloudFiles will fetch the file from the cloud storage each time the CloudFiles link is accessed.