Preview image not previewing
Lowell - July 7, 2007 - 04:11
| Project: | WebFM Images |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I hate to be the first to submit a bug...well maybe it's not a bug
anyways, the preview does not preview even though the option to preview is in the context menu
when choosing the Preview image option...
the browser status will show "Looking up webfm_send..." for a few seconds and then switches to "done" without anything happening on screen
using webfm 1.8, drupal 5.1, firefox browser

#1
No worries about being the first to submit a bug... I'm glad people are trying it out and kicking the tires.
The preview is based on webfm_send which is the 'secure' file download method for webfm.
First make sure you can access files via webfm_send. e.g. http://example.com/webfm_send/1
If it is working the file will be displayed bellow the collapsed field sets.
andre
#2
the webfm_send is working from the url, but I get nothing when selecting the file preview option on both the Web File Manager page and the content type with webfm attachments enabled...hmmm
#3
Also not working on the WebFM 5.x demo site
#4
I think you've got an extra slash in the wrong place. If you edit webfm_images.module to remove the superfluous slash before webfm_send e.g:
case 'preview image':
if($fid = webfm_get_fid(trim(rawurldecode($_POST["filepath"])))){
$url = url('webfm_send/' . $fid); // THIS LINE HERE
print $url;
}
else {
$modulepath = drupal_get_path('module', 'webfm_images');
print($modulepath .'/images/no-preview.png');
}
break;
then it should work. Apologies Andre for not mentioning that when I first found it.
Geoff
#5
Preview functionality is moving to WebFM core. Look at latest release 5.x-1.12.