The audio module checks to see if a file has the correct file extension after the file is uploaded, in audio_prepare().

Is there a particular reason for doing it that way, instead of in the audio_validate()?

It would be much better to refuse an upload before transmitting, of course.

Comments

toemaz’s picture

Category: bug » feature

It would be much better to refuse an upload before transmitting, of course.

That would be a job for a more advanced upload system such as swfupload. I think integrating with swfupload has been posted already before in this project.

I moved this issue category to a feature request since the extension check does work well.

drewish’s picture

it happens in _prepare because _validate is too late in the form building cycle to get the preview generated correctly. it's much cleaner in D6.

rjleigh’s picture

figured there was a valid reason, thanks. and you're right, it's not really a bug (although it does bug my users).

drewish’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.