Welcome, Guest
Username: Password: Remember me

TOPIC: [CLOSED] Mime type not valid (), allow ...

Mime type not valid (), allow ... 14 Nov 2014 11:29 #12772

  • albert
  • albert's Avatar
  • Offline
  • Senior Member
  • Posts: 70
  • Thank you received: 2
  • Karma: 2
Hi,

I receive an empty mime type ..
You know what can i do ?

Moreover i can't download the file on the form
Last Edit: 14 Nov 2014 11:39 by albert.
The administrator has disabled public write access.

Mime type not valid (), allow ... 14 Nov 2014 14:28 #12773

  • albert
  • albert's Avatar
  • Offline
  • Senior Member
  • Posts: 70
  • Thank you received: 2
  • Karma: 2
ok, following the documentation i can skip the mime checking (it is a bug) by commenting the mime checkin on the upload.php file

on the other hand i can make the item downloadable by adding:
$field->jdomOptions = array(
...
'target' => download

now everuthing it works fine but i am getting :

WARNING
JFile: :read: Unable to open file: /tmp/phpuasVN1
Warning: Failed to move file!

ERROR
Could not upload the file 'name-of-a-file.'
Impossible to upload file : name-of-a-file.pdf

extrange isn't?
The administrator has disabled public write access.

Mime type not valid (), allow ... 14 Nov 2014 14:39 #12774

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
The mime detection can use various ways to get the informations.
Many times it has to do with the PHP version you are using and the activated modules.

For you file upload problem, did you checked well the permissions ?
CHMOD and folder owner.

This is really common problem in joomla when www-data user does not have access to parent folder.
Even me I am struggling many times with this depending if I copy the files with FTP or if I use an unpacker. This is just an example.
Put www-data user or group to be able to create files.

Hope it helps.
Coding is now a piece of cake
The administrator has disabled public write access.

Mime type not valid (), allow ... 14 Nov 2014 16:09 #12776

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
This is a new ticket.

Moved. I will treat it.
Coding is now a piece of cake
The administrator has disabled public write access.

Uploaf file 17 Nov 2014 10:09 #12779

  • albert
  • albert's Avatar
  • Offline
  • Senior Member
  • Posts: 70
  • Thank you received: 2
  • Karma: 2
Hi, I commented out the mime check comparation, and now, the file uploads correctly but i obtain lots of errors !! (see attach)
the permissions are ok, the file is orrectly there and shown in the form !
The administrator has disabled public write access.

Uploaf file 17 Nov 2014 13:44 #12780

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
You cannot host pictures here, but, I would be interrested to see your attachements.
Are they notices and warnings ?


Sometimes thoses errors are not been fixed because when the output is something else than HTML, or when it is before redirection, then the errors are not visible, and appears when you have a fatal, you can see them all.
Coding is now a piece of cake
The administrator has disabled public write access.

Uploaf file 17 Nov 2014 15:09 #12783

  • albert
  • albert's Avatar
  • Offline
  • Senior Member
  • Posts: 70
  • Thank you received: 2
  • Karma: 2
×
NOTICE
Please make sure the folder ( /var/www/web/images/arxius-facturacio/propostes/ ) is writable

Please make sure the folder ( /var/www/web/images/arxius-facturacio/propostes/ ) is writable

×
WARNING
JFile: :read: Unable to open file: /tmp/phpKE2ByE

Warning: Failed to move file!

×
ERROR
Could not upload the file 'fapac.'

Impossible to upload file : fapac.jpg

×
MESSAGE
Item successfully saved.
Last Edit: 17 Nov 2014 15:10 by albert.
The administrator has disabled public write access.

Uploaf file 18 Nov 2014 16:14 #12787

  • albert
  • albert's Avatar
  • Offline
  • Senior Member
  • Posts: 70
  • Thank you received: 2
  • Karma: 2
I saw on process function on asdministrator/classes/file/upload.php
public function process()
...
echo $this->file->tmp.'<br>';
echo $fileDest;die;

/tmp/phpWWKU1z
/var/www/website/images/folder/propostes/00agendaotocec.

should not be ? this can be the source of the error ?
/var/www/website/tmp/phpWWKU1z
how can i change it
The administrator has disabled public write access.
Time to create page: 0.059 seconds

Get Started