Try our conversational search powered by Generative AI!

Dan Matthews
Sep 22, 2011
  4834
(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
Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog

Azure AI Language – Abstractive Summarisation in Optimizely CMS

In this article, I show how the abstraction summarisation feature provided by the Azure AI Language platform, can be used within Optimizely CMS to...

Anil Patel | Apr 18, 2024 | Syndicated blog

Fix your Search & Navigation (Find) indexing job, please

Once upon a time, a colleague asked me to look into a customer database with weird spikes in database log usage. (You might start to wonder why I a...

Quan Mai | Apr 17, 2024 | Syndicated blog

The A/A Test: What You Need to Know

Sure, we all know what an A/B test can do. But what is an A/A test? How is it different? With an A/B test, we know that we can take a webpage (our...

Lindsey Rogers | Apr 15, 2024