Audio Filename object is wrong

kylebrowning - October 20, 2009 - 18:41
Project:Audio
Version:6.x-1.0-unstable5
Component:contrib
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

Sorry about the title, not sure what else to say, but heres a glimpse of the issue.

If you upload two audio files with the same name, drupal does the right thing to create the filename with an _N on the end.

However, audio module, doesnt update the filename in the node->file object resulting in incorrect download links, and other modules which use this information resulting in the wrong file being used.

Example:

[file] => stdClass Object
(
[fid] => 2592
[uid] => 5270
[filename] => Akal Academy - Darshan Maago Deh Piarey.mp3
[filepath] => files/audio/Akal Academy - Darshan Maago Deh Piarey_0.mp3
[filemime] => audio/mpeg
[filesize] => 24299520
[status] => 1
[timestamp] => 1255695332
)

Note the filepath, and the filename.

 
 

Drupal is a registered trademark of Dries Buytaert.