Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Problems with file upload 11 Jul 2016 07:55 #14202

  • pbianco
  • pbianco's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 47
  • Thank you received: 2
Hi,
in my application the user can upload a gpx file.
It worked perfectly with the old version, with the new version it returns an error "Mime type not valid".
Can you, please, help me to solve this?

My project is Club4000 - Table Dettaglio salite soci - View dettagliosalitesociitem, layout=nuovasalita

Thanks

Please Log in or Create an account to join the conversation.

Problems with file upload 11 Jul 2016 12:46 #14203

Hi Chef,

I'm also having problems with File upload. In my case the file upload won't upload a pdf (when the properties for the field allow it).

The Error says :
"This file extension (pdf) is not accepted, the accepted files are : jpg,png,gif"

(I posted a topic here... www.j-cook.pro/index.php/forum/14-news-c...-file-uploads-images )
Just call me Chris :)

Please Log in or Create an account to join the conversation.

Problems with file upload 13 Jul 2016 15:49 #14232

Hi Chef,

I guess you are pretty busy - but this particular bug is killing me - its holding up two projects of mine that I need to get out.

Hope you can find the time to take a look soon.

(No rush for the other stuff).

Cheers
Just call me Chris :)

Please Log in or Create an account to join the conversation.

Problems with file upload 14 Jul 2016 04:02 #14238

OK - there were some checkboxes hidden for me.

With Chrome and Firefox you will see this...


You need to drag out the dialogue box to see the checkboxes...


I now have an error which is similar to pbianco...
"Mime type not valid (application/force-download), allowed Mimes are image/jpeg - image/png - image/gif - application/pdf - image/jpeg - application/msword : "

I don't get this error in the sandbox. It is only on my server.

So its probably a php/apache configuration - as my server is locked down tight for security. I have certain functions disabled like shell_exec.

Does anyone have any clues to which server/php functions the file upload uses? (I'm still trawling through the forum)
Just call me Chris :)

Please Log in or Create an account to join the conversation.

Problems with file upload 14 Jul 2016 04:52 #14239

Chef has documentation on MIME here...
www.j-cook.pro/index.php/m/mime-type

But this document is out of date. classes / file / upload.php does not exist anymore - as per Chef's announcement here
www.j-cook.pro/index.php/docs/versions/226-2-9

Somebody need to update the documentation :whistle:

I'm going through administrator/components/com_####/helpers/file.php trying to work it out.

Looks like there is relevant code on line 1925...
public static function uploadFile($dir, $uploadFile, $options = array())	{
....
$checkMime = $config->get('upload_check_mime', true);

Just after that, you can hack the code...
//hack
$checkMime = false;

But there might be a better way. The function is looking at a configuration setting somewhere. Does anyone know where that is?
Just call me Chris :)

Please Log in or Create an account to join the conversation.

Last edit: by organicwebs.

Problems with file upload 14 Jul 2016 08:53 #14241

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Thanks, I will check all this as soon as possible and give you an answer, update the docs...
Coding is now a piece of cake
The following user(s) said Thank You: organicwebs

Please Log in or Create an account to join the conversation.

Problems with file upload 14 Jul 2016 21:45 #14248

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
EDIT : The graphical problem has been fixed.


I created an option in your component to toggle the mime-detection.
I updated the docs : www.j-cook.pro/index.php/m/mime-type
Coding is now a piece of cake
The following user(s) said Thank You: organicwebs

Please Log in or Create an account to join the conversation.

Last edit: by admin.
  • Page:
  • 1
Time to create page: 0.068 seconds

I'm playing around with the new mvc and the FORK feature is FANTASTIC!!! it's saving me a lot of time! you are doing a very good job!!

Tomaselli (Forum)  

Get Started