Posted by mwallenberg on February 28, 2012 at 10:01am
3 followers
| Project: | Storage API |
| Version: | 7.x-1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
The return value from the function DrupalStorageStreamWrapper::getExternalUrl shold be a web accessible URL, according to the documentation here. It currently only returns the Drupal path instead. This results in URLs to files looking like this:
http://system/storage/serve/4/filename.jpg
I am using Drupal 7.8 and Storage API 7.x-1.2. This should be a small fix, and I will supply a patch shortly.
Comments
#1
Only a small fix is needed, in storage_core_bridge.module, line 620. The following diff shows the difference:
@@ -617,7 +617,7 @@
}
- return $storage->serveURL();
+ return $storage->serveURL(TRUE);
}
catch (StorageException $e) {
return FALSE;
I've made an attempt at a patch file, though I don't think it can be applied directly. As I said, it's a small change - just supply TRUE as the argument to serveUrl.
#2
Thanks, but this is already fixed in 7.x-1.2: http://drupalcode.org/project/storage_api.git/commitdiff/58a6f62
#3
*facepalm*
Indeed it is. I'll just update my 7.x-1.1 version to 7.x-1.2, and I'll be fine. :P
#4
Automatically closed -- issue fixed for 2 weeks with no activity.