summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Barth2010-09-20 16:48:55 +0000
committerAlex Barth2010-09-20 16:48:55 +0000
commitcc5cf9b5a2b5d8296f42b21b452c4a91ba37c23c (patch)
tree3a0054642af756dea82e90f566ba976f45c245dd
parent94aae911f3d277b3302d5a76eb017101b7c7ecd9 (diff)
Fix file representation on upload form.
-rw-r--r--plugins/FeedsFileFetcher.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/FeedsFileFetcher.inc b/plugins/FeedsFileFetcher.inc
index a263b9e..530c3d1 100644
--- a/plugins/FeedsFileFetcher.inc
+++ b/plugins/FeedsFileFetcher.inc
@@ -56,12 +56,14 @@ class FeedsFileFetcher extends FeedsFetcher {
public function sourceForm($source_config) {
$form = $info = array();
if (!empty($source_config['source']) && file_exists($source_config['source'])) {
+ $wrapper = file_stream_wrapper_get_instance_by_uri($source_config['source']);
+ $path = $wrapper->getExternalUrl();
$info = array(
- 'path' => $source_config['source'],
- 'size' => filesize(realpath($source_config['source'])),
+ 'path' => $path,
+ 'size' => filesize($source_config['source']),
);
if (module_exists('mimedetect')) {
- $info['mime'] = mimedetect_mime(realpath($source_config['source']));
+ $info['mime'] = mimedetect_mime($source_config['source']);
}
}
$form['source'] = array(