Could not display the flash (files/flash/temp/...)
Guru - April 6, 2008 - 18:55
| Project: | Flash Node |
| Version: | 6.x-3.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I am getting the following errors when I create a flash node and upload an mp3 file:
* Could not display the flash because "files/flash/temp/Song.mp3" does not appear to exist.
* Could not display the flash because "files/flash/temp/Song.mp3" does not appear to exist.
It displays it twice (just like above).
However, the Wijering media player (that I have configured with) appears, and even the song plays. I checked the files/flash/ directory and the song is right there in the directory. The temp sub-directory is empty.
So, what's causing this error?

#1
Catching up on my Drupal backlog!
Is this still an issue - I just tested with Drupal 5 / flash node 5.x-5.4 on my test system and it is working ok (both preview mode, and submit)
The fact the file is in the right place says the copy is working (the file is moving from temp to flash), and the fact the audio plays says the database is right.
Does the double error message always appear every time you view the node, or only when you first submit?
Or did the issue go away?
#2
I'm having the same problem .. on all Drupal installations I use .. on all versions of Flashnode .. and both with php 4 and 5.
The error only appears when I first submit and upload the swf, after that everything is fine.
For the rest the module works perfectly .. but it is annoying because the error makes my users think there is something wrong on upload, while in reality the file is uploaded fine.
Hope there is some workaround you can suggest to me to get rid of the message.
#3
I was having the same issues. This bug is result of their being spaces in the file name. It screws up the file path.
I don't know how flashnode for drupal 5 works, but for version 6, I changed this code:
$destination = variable_get('flashnode_default_path', FLASHNODE_DEFAULT_PATH) . '/' . $node->flashnode['filename'];to this:
$filename = str_replace(' ', '_', $node->flashnode['filename']);$destination = variable_get('flashnode_default_path', FLASHNODE_DEFAULT_PATH) . '/' . $filename;
What this does is replace any spaces in the file name when saving it to the server. This prevents the errors from occuring.
#4
A few people have reported problems with filenames containing spaces. There was some code committed to encode spaces where they occur, but the fix of replacing spaces with underscores is probably more reliable, so I've added it in.
Committed on all branches, and tested locally by uploading files containing spaces and it seems ok.
#5
Committed and included in latest releases.
#6
Automatically closed -- issue fixed for two weeks with no activity.
#7
its working now
I used SWF Tools and i felt the same error while calling the flash (.swf) file , i just changed the path in swftools.module as
function swftools_get_media_url($path, $is_file = TRUE) {
$media_url = trim(variable_get('swftools_media_url', ''));
$media_url = "sites/default/files" ;
// We do nothing with a remote media file.
if ($media_url) {
return $media_url . '/' . $path;
}
if (variable_get('swftools_check_media', TRUE) && $is_file) {
if (file_exists($path)) {
return file_create_url($path);
}
else {
drupal_set_message(t('Could not display the flash because %path does not appear to exist.', array('%path' => $path)), 'error');
return FALSE;
}
}
=> and now its working
#8
I just had this problem arise again with 6.x-3.1 when trying to upload an .mp3 file.