http://drupal.org/project/storage_api

Storage API is a low-level framework for managed file storage and serving.

It has the following features:

Pluggable architecture - it can be extended to work with any storage service.
Redundancy - it can be configured to store your files in multiple services and instantaneously change which one is serving. This means your site will not be brought down by a service having problems.
Access control API - can be used for e-commerce.
Deduplication - when files that are identical are stored in the same container, only one instance will be created. This saves bandwidth and storage.
File and image field integration - enable the "core bridge" sub-module.
Audit module - compares a manifest of files with what is recorded in the database to ensure that the record is accurate.
Services

Filesystem - files are stored in a local directory and served via any HTTP or FTP service running on the server.
Database - really just a proof of concept. All files are stored in the database and served via Drupal.
FTP - files are uploaded to a directory via FTP. A URL prefix can be defined for serving.
Amazon S3 / CloudFront - files are uploaded to an S3 'bucket'. Serving is handled by S3 or CloudFront. Also supports media streaming and time-limited cryptographically-signed URLs.
Rackspace Cloud Files - served using Limelight Network's CDN.

Storage API allows you to setup a kick storage setup with CDN integrations, out of the box you get S3 & Rackspace and other normal stream wrappers.

An integration with the Storage API module in Video would be pretty hot. This is a placeholder for the conversation.

Comments

rurri’s picture

+1 Request on this one.

Storage API also manages transferring to multiple CDN's, it keeps track of which files are where, allows for an easy migration from one CDN to another, and would relieve Video module of having to integrate to different CDN's.

Rurri

Jorrit’s picture

Status: Active » Postponed

I am first going to fix the most important bugs, after that this looks like a great new feature.

jpstrikesback’s picture

@Jorrit - Awesome!

30equals’s picture

Status: Postponed » Needs review
StatusFileSize
new804 bytes

Hiya,

Attached is a very very basic patch to start the storage api integration. It just adds a submodule which implements the hook_storage_core_bridge_field_types hook, so you can video fields can use the storage api as well. This is just for the location of the original file. I'm looking at integrating it further so you can choose the output locations as well by using the storage api.

30equals’s picture

So i was thinking about the whole issue, and i think that the integration kinda depends on the transcoder being used ?
Because, for instance, when using the Zencoder transcoder, file storage of the output get's handled by the transcoder itself, so you only need to provide different location urls (eg. ftp://user:pw@host) so Zencoder knows where to put it.

Personally, i think it isn't that straightforward to provide a clean solution to cover all transcoders. Just thinking out loud here, but any thoughts ?

bgilhome’s picture

StatusFileSize
new6.28 KB

I've attached a patch which goes some way to integrating Storage API - adds storage class selectors for the original/converted/thumbnails stream selection fields in video field edit forms. Tested OK with FFmpeg as transcoder & local storage for original and local/S3 storage for converted/thumbnails.

NB/TODO: createTemporaryLocalCopy() in video.utility.inc currently only works for original files served by a local container.

bgilhome’s picture

Actually createTemporaryLocalCopy() isn't quite working properly - another patch to come.

retiredpro’s picture

Hi bgilhome,

Any updates to your patch?

bgilhome’s picture

Hi retiredpro, I abandoned this approach, I think from memory I had some success by patching storage_api to be compatible with core file system:

https://drupal.org/node/1138052#comment-7634765

retiredpro’s picture

Thanks bgilhome. I'll check it out.

keti-1931’s picture

Thanks bgilhome. your patch works for me

fox_01’s picture

The patch seems not to work with video convertion with zencoder api

Warning: is_dir(): Unable to find the wrapper "storage-field-preview-video-con" - did you forget to enable it when you configured PHP? in file_prepare_directory() (line 437 of /var/www/vhosts/commercetest.malta1066.server4you.de/httpdocs/includes/file.inc).

Video conversion failed. Could not create the directory: storage-field-preview-video-converted://233

fox_01’s picture

With the patch #1138052: File entity module compatibility there is only a possibility to select one storage api class for all files. This patch #8 from this issue looks much better from perspective of flexibility. Is there a new status?

fox_01’s picture

After enabling the video_storage module that comes through the patch #8 i get a lot of the messages
Notice: Trying to get property of non-object in video_stream_wrappers() (line 43 of httpdocs/sites/all/modules/video/modules/video_storage/video_storage.module).

jonhattan’s picture

FYI Integration with https://www.drupal.org/project/storage_api_stream_wrapper comes out for free. No need for an integration module in the Video side.

  • heshanlk committed eae8e22 on 7.x-2.x authored by bgilhome
    Issue #1441820 by bgilhome, 30equals: Integrate with Storage API FTW!
    
hypertext200’s picture

Status: Needs review » Fixed

  • heshanlk committed 1219e4d on 7.x-2.x
    Revert "Issue #1441820 by bgilhome, 30equals: Integrate with Storage API...
hypertext200’s picture

Status: Fixed » Postponed