Help shape the future of CMS PaaS release notes! Take this quick survey and share your feedback. 

Dan Matthews
Sep 22, 2011
  5067
(3 votes)

Using Dropbox to avoid bandwidth burn

The cloud is great. You can store stuff in it, even run apps in it. And EPiServer can make good use of it too. One thing you can do is store your files in the cloud and access them via a VPP. You can just use the cloud as a remote repository and still route the actual file streams through the server. Not an issue with small files and infrequent downloads, but with big files and frequent downloads, this will soon bloat your server bandwidth. As the cloud would typically be used for larger, more frequent downloads, a different solution might be a good idea, bypassing EPiServer for the actual download.

Of course, to work this way you need a cloud repository that exposes files, and one of those is Dropbox. What I’ve done is to write a VPP that exposes a Dropbox public folder, but when a file is requested it redirects to that file direct from Dropbox. It’s a bit of a hack, but it works fine and saves all the server bandwidth that grabbing a file would normally use.

The actual communication for pulling file and folder information between the VPP and Dropbox is done via the Dropbox REST API. I use the nice DropNet library to handle the actual REST calls and wrap the responses nicely for me. File summaries are supported and stored in the DDS. The implementation is read-only for now, but could be easily extended. For example, you could support moving/deleting through Dropbox API calls easily enough, and even do uploads. I simply didn't need them for the purpose I wrote this.

You can get the source yourself and read all about the module on epicode and, if you like it, feel free to implement some of the other features and commit it back Smile

Edit: I’ve been alerted that the Amazon S3 VPP actually uses a custom rewriter to rewrite the links on-the-fly if they are on the cloud server. That’s very elegant and I’m upset I didn’t think of it. Nice one guys Smile

Sep 22, 2011

Comments

smithsson68@gmail.com
smithsson68@gmail.com Sep 22, 2011 03:11 PM

Nuget package please ;-)

Sep 22, 2011 04:09 PM

As you wish :)

Frederik Vig
Frederik Vig Sep 23, 2011 12:13 PM

Hi Dan
We're actually hooking into the HTML Rewriter and updating the URLs to access directly from Amazon S3 or CloudFront instead of going through the server. If the users requests the file from the server we redirect them. So no file streams go through EPiServer.

Frederik

Mari Jørgensen
Mari Jørgensen Sep 23, 2011 12:26 PM

Nice

Sep 28, 2011 05:48 AM

Awesome

Please login to comment.
Latest blogs
Be careful with your (order) notes

This happened a quite ago but only now I have had time to write about it. Once upon a time, I was asked to look into a customer database (in a big...

Quan Mai | Feb 5, 2025 | Syndicated blog

Imagevault download picker

This open source extension enables you to download images as ImageData with ContentReference from the ImageVault picker. It serves as an alternativ...

Luc Gosso (MVP) | Feb 4, 2025 | Syndicated blog

Optimizely SaaS vs PaaS: A Comparison from Client and Developer Perspectives

Optimizely, one of the leading digital experience platform. Offering both Software-as-a-Service (SaaS) and Platform-as-a-Service (PaaS) solutions....

Praful Jangid | Feb 3, 2025

Returning to Optimizely After Many Years

Returning to Optimizely After Many Years: A Journey Through Its New Features After several years away from Optimizely’s Content Management … More

Jose Neto | Feb 2, 2025 | Syndicated blog

Aspiring Optimizely

Adding .NET Aspire application host to your Optimizely project (even if it’s just for local development) is really a time-saver when it comes to...

valdis | Feb 2, 2025 | Syndicated blog

My Journey to Optimizely Certification: Study Tips, AI Tools, and Exam Strategies

How I Prepared for My Optimizely Certification Exam Hello everyone, I recently took the Optimizely Certification Developer Exam and became certifie...

calimat | Jan 31, 2025