Trouble with pdf not uploading

Home \ forums/topic \ Trouble with pdf not uploading

Support Home Page Forums Joomla Software Easy File Uploader Module Trouble with pdf not uploading

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #657

    Hi Michael. I’ve been unable to get your module to allow uploading pdf files. Here’s my information:

    Joomla: 2.5.6

    PHP Version: 5.3.3-7+squeeze14.

    FILEINFO_MIME_TYPE is defined.

    finfo_open is callable.

    finfo_file is callable.

    finfo_close is callable.

    mime_content_type is callable.

    This is a NON-Windows OS: Linux.

    escapeshellarg is callable.

    exec is callable.

    shell_exec is callable.

    Permitted file types:


    Also, I plan to modify the module to display the URL to the uploaded file so registered members may link to them. If you want, let me know and I’ll send you the code when I get it done.

    Michael Gilkes

    @volantis. Thanks for posting. When you say, “I’ve been unable to get your module to allow uploading pdf files”, what do you mean? Do you get an error message when you upload? If you do, what is it?

    If you want to, the best thing to do is to provide me with a link to the webpage with the uploader so that I can see how it works and what errors or messages you are getting.

    Also, if you have already started to alter the code, I won’t be able to help you since I don’t know what you did. But, once I can examine it and know that it is working out-of-box on your server, then you can alter it to your hearts content. I encourage customization anyways, since everyone’e needs may be slightly different.

    You can email the link to me if you like.


    I haven’t started customizing yet…just wanted to get the base fully functional. Sorry I didn’t provide more complete info. It works fine when uploading an image or a file type that was already in the list. Here’s the error when trying to upload a pdf:

    ERROR: The uploaded file type (application/pdf)is not permitted.

    It’s just in development right now, so you can see it yourself here:


    Michael Gilkes

    @volantis. Thanks for the link. However, I don’t see the file uploader at that link.

    Since you’re a coder, one of the things you can do is add the following lines to the helper.php file:

    Please add that line at about line 136, just above the if statement, in the private static function isValidFileType(&$params, &$i) method.

    After you do this, try to upload both an image file and a pdf file, and check your php error log, and post the result to me here. We’ll be able to figure it out at that point.


    The module is still published on that link…just above the main content area and under the showcase rotator, in case you want to see it for yourself. Here’s the PHP error log:

    [13-Sep-2012 12:02:42] image/gif;image/jpeg;image/pjpeg;image/png;application/pdf;application/msword;application/zip;application/x-compressed;application/x-zip-compressed;multipart/x-zip;application/excel;application/;application/x-excel;application/x-msexcel;application/pdf;



    [13-Sep-2012 12:04:13] image/gif;image/jpeg;image/pjpeg;image/png;application/pdf;application/msword;application/zip;application/x-compressed;application/x-zip-compressed;multipart/x-zip;application/excel;application/;application/x-excel;application/x-msexcel;application/pdf;



    There’s something going on with the spelling of application, but it’s right on my backend so I’m not sure what the issue may be. Thanks a ton for looking at this.

    Michael Gilkes

    @volantis. Thanks for updating me so that I can see what is happening. Actually, the spelling of “application” as “applicaton” is exactly the problem. This does not seem to be a unique problem. Here are posts elsewhere of persons experiencing the same issue:

    What browser (name and version) are you using to test the uploads? Could you try another browser and see what happens? The information the script gets from $_FILES is from the browser, and it seems that your browser may be giving it this mispelled mime.


    I’m using Firefox 15.0.1. I also just realized you have to be logged in to see the upload module. Whoops.

    You are correct though, it worked in Google Chrome. Can I just add the misspelling in the MIME list in the module settings? Is there a reason that wouldn’t work?

    Michael Gilkes

    @volantis. I am glad we were able to sort out the problem. In short… yes, you can add the misspelling to the list and it should compensate for the browser error. I am surprised that Firefox 15 is giving that error. I would be good to report it to Mozilla somehow.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Trouble with pdf not uploading’ is closed to new replies.