Blog overview

/ Building a filetransfer-application on the CloudVPS Object Store

Building my CloudTransphper application

Recently, I built the CloudTransphper demo application to support an article I was writing for the September issue of PHParchitect, an international PHP magazine. In this article I give a tutorial about building a simplified version of the popular filetransfer-application WeTransfer. For the storage of the uploaded files, I'm using the CloudVPS Object Store. In this blogpost, I would like to share my experiences working with the CloudVPS Object Store during the development of this application.


The first thing that really stands out is the fact that CloudVPS uses OpenStack for their object store. This helps tremendously in getting your software up-and-running quickly because of a number of reasons:

  • Aside from the CloudVPS documentation, there is a lot of documentation to be found on the Internet how it works.
  • There are many open source libraries to connect to the OpenStack API. Examples and instructions can be found on the CloudVPS site.

The OpenStack API is very easy to use, and I quickly found a library that would enable me to work with it. The HPCloud-PHP library works like a charm with the CloudVPS Object Store. The CloudVPS Knowledge Base features a howto for this library. I wrote a small wrapper class to easily integrate the CloudVPS API into my project.

No hassle setup

Often when setting up external services, it takes quite a while to realise this. I've found the Object Store of CloudVPS to be an excellent exception to that rule. With a clear web interface I can manage my containers and even the objects in those containers. Configuring my code to authenticate against the API was also a breeze. Again, here, the documentation really helps, and searching Google for OpenStack-related topics ensured I was able to easily set everything up.

Private vs Public

One thing I noticed (but did not implement in the application) was the difference between private and public containers. In my current demo-application, I use a public container, but if I were to implement a more advanced version of CloudTransphper, using private containers would definitely also be an option. But besides adding a couple of API calls, this does not really change anything to the logic in the application. It is, however, important to note the difference, as public containers are easily accessible. If you're to implement a WeTransfer-like site and you want your users to be able to send confidential files then the use of private containers would be recommended.


The above examples of things I've been spending my time on seem to illustrate exactly why chose the CloudVPS Object Store: Instead of having to debug specific issues and search for specific solutions, I could spend my time on learning to work with the OpenStack API and considering architectural decisions. The implementation was a relatively small detail in the grand scheme of things. This is how integrating external systems should be: Don't worry about implementation, just look at the bigger picture.

Share this article

Related articles

Blog overview

Author: Stefan Koopmanschap