Posted by omniverse on June 5, 2009 at 6:09pm
3 followers
| Project: | FileField |
| Version: | 6.x-3.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Using filefield to allow an administrator to upload .swf files. Flash (.swf) files are to be viewed by the end user in the browser, via a specialized template which requests the file vie javascript. Using private files ( 'system/files' request ). Currently, the .swf file does not play as the Content-Disposition is set to 'attachment' instead of inline. If the file is requested directly (outside of its template), the browser prompts to download.
For a fix, add to filefield_file_download just after the text or image disposition is set.
if ( $file->filemime == 'application/x-shockwave-flash' )
$disposition = 'inline';
Comments
#1
Strange this fix must have only been committed to the Drupal 5 version somehow. I've reapplied the fix from #325795: Content-Disposition: attachment breaks swf content to the Drupal 6 version which should fix this problem.
#2
Automatically closed -- issue fixed for 2 weeks with no activity.