When you get mosso (Rackspace CDN) support let me know, I will be the first the make the jump.

Comments

matt2000’s picture

Title: Mosso Support » Rackspace Cloud Support

Mosso is now known as the Rackspace Cloud.

matt2000’s picture

Project: Blue Droplet Video » Storage API

Actually, this isn't a bd_video issue. Moving, although it's probably duplicated in the Storage API queue.

bryancasler’s picture

I am confused by your response, could you please re-state it.

matt2000’s picture

bd_video module is ignorant of CDNs. This is the domain of StorageAPI module. So I moved the issue to the StorageAPI issue queue.

matt2000’s picture

Status: Active » Needs review
StatusFileSize
new6.12 KB
new148 bytes

Here's a relatively functional start on a service module for Rackspace Cloud Files.

Copy these files to a subfolder of storage_api/services/ (renaming the .module.txt file to .module) along with the Cloud Files PHP client code files found here:

http://github.com/rackspace/php-cloudfiles/tree

As noted in the code comments, I couldn't find explicit documentation on what is means for a service to be 'dynamic', so I don't know the consequences of identifying could files as such... except that it let me get away with writing less code and it 'works for me(tm).' ;-)

Note that this code assumes that the container already exists; i.e, that it was created using the Rackspace admin UI. There's no reason that hook_storage_container_create() couldn't be modified to create a non-existent container. I just didn't bother.

jbrown’s picture

Assigned: Unassigned » jbrown

This is excellent matt2000! I'll take a look at it tomorrow.

jbrown’s picture

StatusFileSize
new7.94 KB
new689 bytes
new160 bytes

Okay - I've been hacking on it for a couple of days.

Its working pretty well, but needs some more love.

Should get it polished off tomorrow.

matt2000’s picture

nice. Is there any documentation on how storage_api treats a 'file' versus and 'object' and what it really means for a service to be 'dynamic' ?

jbrown’s picture

storage_api.api.php has a very brief explanation. Here is the full story:

Storage API implements deduplication where possible.

The problem is that with most storage services, the filename in the Content-Disposition HTTP header must be set when the instance is created. These services are said to not be dynamic.

The only dynamic service at the moment is 'Filesystem / Drupal'. It serves files via Drupal (like private files in Drupal core). It just spits out the correct Content-Disposition HTTP header depending on which file is being served.

Object instances can have deduplication. File instances cannot.

Where all of the following conditions are met, a file instance is created instead of an object instance:

  • the file has a filename
  • the container is a serving container
  • the service is not dynamic

Therefore an instance in a dynamic service will never need to be a file instance and the file instance hooks will never be called for that service.

jbrown’s picture

According to tech support at Rackspace it is not possible at all to set the Content-Disposition header in Cloud Files.

So I just tag the filename onto the end of the URL for file instances for this service. Unfortunately, browsers wont always bring up a save as dialog box without Content-Disposition: attachment; .

jbrown’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new9.15 KB
new869 bytes
new160 bytes

Okay - its finished.

I'll check it in now.

jbrown’s picture

Status: Reviewed & tested by the community » Fixed
matt2000’s picture

Status: Fixed » Needs work

The project page text needs to be updated.

Thanks for finishing this up & adding it!

jbrown’s picture

Status: Needs work » Fixed

done

bryancasler’s picture

This is exciting, been following this thread for a while. Does jbrowns post #14 means that storage api now supports rackspace's cloud files ?

jbrown’s picture

yes

jbrown’s picture

It is now documented here: http://drupal.org/node/656714

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.