Image upload doesn't work - File format not allowed

Last post 03-28-2011, 6:04 AM by bix. 16 replies.
Sort Posts: Previous Next
  •  03-10-2009, 2:17 AM 49667

    Image upload doesn't work - File format not allowed

     

    Hello!

    I have a problem with upload of images.

    I didn’t make any restrictions.

    My php-code is:

     

                $editor=new CuteEditor();

                $editor->ID="Editor1";

                $editor->Text="";

                $editor->FilesPath="/editor_intranet/CuteEditor_Files";

                $editor->FilesGalleryPath = "/upload/Newssystem/Images";

                $editor->ImageGalleryPath = "/upload/Newssystem/Images";

                $editor->EditCompleteDocument=false;

                $editor->AutoParseClasses=true;

                $editor->SaveFile();

                $editor->ShowHtmlMode=false;

                $editor->Height="400";

                $editor->Width="800";

                $editor->UseStandardDialog=true;

                $editor->BreakElement="Br";

                $editor->Draw();

                $editor=null;

     

    But I can’t upload any images, I become always massage like image/x-pngimage/png File format not allowed! Please contact site administrator.

    For all the types of image-files. I can upload other files like doc or pdf, but not images. I don’t use any filters and I didn’t change the configuration files. I can’t find what is wrong.

    In my default configuration file stay this:

                <security name="ImageFilters">

                            <item>.jpg</item>

                            <item>.jpeg</item>

                            <item>.gif</item>

                            <item>.png</item>

                            <item>.bmp</item>

                </security>

    I understand, that these files are allowed for upload. But it doesn’t work.

    My upload folder hat the rights rwx, is free for all user to write or change the files there.

    Please answer me how I can resolve this problem.

     

    Thank you in advance!

     

  •  03-10-2009, 2:37 AM 49669 in reply to 49667

    Re: Image upload doesn't work - File format not allowed

    Please open Include_Mimetype.php 

    And change

    ".png" => "image/png",

    To:

    ".png" => "image/x-png",


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-11-2009, 2:42 AM 49729 in reply to 49669

    Re: Image upload doesn't work - File format not allowed

     
    And where can i find file Include_Mimetype.php, there is no such file.  Witch folder?
     
  •  03-11-2009, 4:45 AM 49731 in reply to 49729

    Re: Image upload doesn't work - File format not allowed

    I have performed a quick search for you, file could be located at:
    CuteEditor_Files\Dialogs
     
    kind regard,
    Joke Dekker
  •  03-12-2009, 11:16 AM 49801 in reply to 49731

    Re: Image upload doesn't work - File format not allowed

    Thanks a lot for the answer!
     
    It works now with all images except tiff. I got the messages:
     
    image/tiffimage/tiff File format not allowed!
     
    image/tiffimage/tif File format not allowed!
     
    but i don't have any idea how i should change Include_Mimetype.php
  •  03-12-2009, 12:56 PM 49814 in reply to 49801

    Re: Image upload doesn't work - File format not allowed

    1. Please check this article:
     
    Restricting Document Files by Extensions and Types
     
    And add the following code to the security file:

    <item>.tif</item>
     
    2. 
     
    Please open Include_Mimetype.php 

    And change

    ".tif" => "image/tif",

    To:

    ".tif" => "image/tiff",

     


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-13-2009, 7:11 AM 49840 in reply to 49814

    Re: Image upload doesn't work - File format not allowed

    I have already in Include_Mimetype.php such information. I have there:
     
     
    ".tiff" => "image/tiff", 
     ".tif" => "image/tif",
     
    But i still get the message for the tif and tiff images:
     
    image/tiffimage/tiff File format not allowed!
     
    image/tiffimage/tif File format not allowed!
     
     
     
    Please tell me how i could change Include_Mimetype.php to make it possible to  upload tif and tiff images
  •  03-13-2009, 2:10 PM 49856 in reply to 49840

    Re: Image upload doesn't work - File format not allowed

    And change

    ".tif" => "image/tif",

    To:

    ".tif" => "image/tiff",

    Keep me posted


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-16-2009, 3:57 AM 49911 in reply to 49856

    Re: Image upload doesn't work - File format not allowed

    Now i have in my Include_Mimetype.php:
     
     
     ".tiff" => "image/tiff", 
     ".tif" => "image/tiff",
     
    But i still get the message:
     
    image/tiffimage/tiff File format not allowed! Please contact site administrator.
     
    So i can't upload tiff/tif Images
  •  03-16-2009, 12:10 PM 49934 in reply to 49911

    Re: Image upload doesn't work - File format not allowed

  •  03-17-2009, 2:49 AM 49973 in reply to 49934

    Re: Image upload doesn't work - File format not allowed

    No. It doesn't work also.

    In your example editor i get error messages:

    image/tiffimage/tiff File format not allowed! Please contact site administrator.
    for tiff

    image/x-citrix-pjpegimage/jpeg File format not allowed! Please contact site administrator.
    for jpeg
     
    image/bmpimage/bmp File format not allowed! Please contact site administrator.
    for bmp
     
    image/x-citrix-gifimage/gif File format not allowed! Please contact site administrator.
    for gif
     
    But in my site/editor i have made some changes in Include_Mimetype.php and now it works with jpeg, gif, bmp, png.
    But it still DOESN'T work with tiff or tif!
     
    Please answer me, because i need a solvation for this problem. I can't upload tiff/tif images!
  •  03-19-2009, 8:22 AM 50066 in reply to 49973

    Re: Image upload doesn't work - File format not allowed

    No. It doesn't work also.

    In your example editor i get error messages:

    image/tiffimage/tiff File format not allowed! Please contact site administrator.
    for tiff

    image/x-citrix-pjpegimage/jpeg File format not allowed! Please contact site administrator.
    for jpeg
     
    image/bmpimage/bmp File format not allowed! Please contact site administrator.
    for bmp
     
    image/x-citrix-gifimage/gif File format not allowed! Please contact site administrator.
    for gif
     
    But in my site/editor i have made some changes in Include_Mimetype.php and now it works with jpeg, gif, bmp, png.
    But it still DOESN'T work with tiff or tif!
     
    Please answer me, because i need a solvation for this problem. I can't upload tiff/tif images!
  •  03-19-2009, 11:27 AM 50092 in reply to 50066

    Re: Image upload doesn't work - File format not allowed

    When uploading files Cute Editor for PHP checks the MIME type for the file uploaded against an array of allowed mime types for security reasons.
     
    We are investigating the array of allowed mime types and will get back to you today.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-20-2009, 4:13 AM 50115 in reply to 50092

    Re: Image upload doesn't work - File format not allowed


    I think i have the problem with the images because i use a citrix client. I have already found how i should change the Mime-types in Include_Mimetype.php for some common images, but i still don't know how i should change Include_Mimetype.php to make it able to upload the tiff/tif-Extentions images with editor.
     
  •  03-20-2009, 11:24 AM 50130 in reply to 50115

    Re: Image upload doesn't work - File format not allowed

    oxflo,
     
    Please back your copy and download the control again.

    We added a new function in Include_Mimetype.php. Hope it can resolve your problems.
     
    function upload_translate_datatype($str_datatype)
    {
    ...
    }
     
    Keep me posted

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-28-2011, 2:56 AM 66886 in reply to 50130

    Re: Image upload doesn't work - File format not allowed

    Got same problem with .png
    All is fine with the mime array but somehow i get:
    imageimage/pngimage/x-pngFile format not allowed! Please contact site administrator.
    been search for 
    image/png
    in the files but can't find it. But still image/x-png seemt to NOT be allowed.
    How do I find the allowed array (if there is 1)
     
    facts:
    $Filter_Array in filepost.php  holds the value ".png"
    GetExtension($filename) in filePost.php return ".png"
     
    plz help
     
    /bix
  •  03-28-2011, 6:04 AM 66890 in reply to 66886

    Re: Image upload doesn't work - File format not allowed

    SOLVED
    Turns out that 
    $_FILES["file"]["type"] returns image/png, NOT image/x-png.
     
    So I just edited the include_mimetype.php to hold that value for png and problem solved.
     
    /Bix
     
View as RSS news feed in XML