Skip to content
Snippets Groups Projects
Commit cc5cf9b5 authored by Alex Barth's avatar Alex Barth
Browse files

Fix file representation on upload form.

parent 94aae911
No related branches found
No related tags found
No related merge requests found
......@@ -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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment