Reputation: 1163
When I run my functional tests through Symfony, the uploaded file is not being supplied with a mime type.
My test case shows:
$browser->info('1 - Test Upload Form')->
get('/formpage')->
setField('myform[file]', sfConfig::get('sf_upload_dir').'/example.doc')->
click('input[type=submit]')->
end
;
And is executed on the command line like so:
./symfony test:functional frontend upload
The output given is:
Array
(
[name] => example.doc
[type] =>
[tmp_name] => /.../web/uploads/example.doc
[error] => 0
[size] => 15360
)
Why is no mime type provided? Is there a way to put the mime type in?
Upvotes: 0
Views: 712
Reputation: 21
Info
if u know the error. Then try to clear it first before testing. Use like this..
$filename . $extension ;
$extension = $file -> getExtension ( $file -> getOriginalExtension ( ) ) ;
Upvotes: 1