Page 1 of 4 1234 LastLast
Results 1 to 10 of 39

Thread: Cannot upload logo

  1. #1
    kazoot is offline Junior Member
    Join Date
    Nov 2007
    Posts
    3

    Default upload logo gets a popup error

    Hi all,

    There has to be a simple answer to this but I can't find it in the forums.

    In the Admin>System Settings: section I am trying to upload a logo. I have both .jpg and .png formats and the image is 212x40.
    I click "Browse..." and select the image. Immediately a pop-up alert tells me
    "The file format of the image must be JPEG or PNG. Upload a new file with the file extension .jpg or .png."

    It has to be some kind of regex check but it isn't working. I've tried both Firefox on Fedora 8 and Firefox and IE7 on winXP.

    Thanks for any help!
    T.
    Last edited by kazoot; 2008-02-23 at 02:56 AM. Reason: title was not correct

  2. #2
    stackedsax is offline Sugar Community Member
    Join Date
    Feb 2006
    Posts
    18

    Default Re: Cannot upload logo

    Getting the exact same message here. I'll just upload mine SFTP-style... but methinks something's not quite right with the uploadCheck(false) function in modules/Configurator/EditView.tpl

    -SS

  3. #3
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: Cannot upload logo

    I have seen this happen when the JPG or PNG is created on a Mac and uploaded to a non-Mac server. Somehow the MIME type gets screwed up. SugarCRM is not just looking at the extension, it is looking at the headers of the file.


    Were your files created on a Mac?
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  4. #4
    assistgroup is offline Junior Member
    Join Date
    Feb 2008
    Posts
    2

    Default Re: upload logo gets a popup error

    Quote Originally Posted by kazoot
    Hi all,

    There has to be a simple answer to this but I can't find it in the forums.

    In the Admin>System Settings: section I am trying to upload a logo. I have both .jpg and .png formats and the image is 212x40.
    I click "Browse..." and select the image. Immediately a pop-up alert tells me
    "The file format of the image must be JPEG or PNG. Upload a new file with the file extension .jpg or .png."

    It has to be some kind of regex check but it isn't working. I've tried both Firefox on Fedora 8 and Firefox and IE7 on winXP.

    Thanks for any help!
    T.
    I'm having exactly the same issue on a fresh 5.0.0b install. The logos were not created on a Mac

  5. #5
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: Cannot upload logo

    What are the permissions on your include/images directory? Do you see the files show up there or in your temp upload directory?
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  6. #6
    assistgroup is offline Junior Member
    Join Date
    Feb 2008
    Posts
    2

    Default Re: Cannot upload logo

    That could be the problem... I have full permissions set on my inc/images directory, but my php config is set to system default for the temp_upload_dir. So i'll configure an alternate temp upload directory for php and set appropriate permissions and report back how that goes.

    Cheers

  7. #7
    kazoot is offline Junior Member
    Join Date
    Nov 2007
    Posts
    3

    Default Re: Cannot upload logo

    Thanks for your help Ken.

    The png image was create in GIMP on Fedora 8 Linux. The jpg was created in PhotoFiltre on WinXP.

    The SugarCRM CE is 5.0.0b (Build 3150) on CentOS 5.1. The directory permissions on include/images are currently set 777

  8. #8
    dhichandler is offline Member
    Join Date
    Dec 2006
    Posts
    8

    Default Re: Cannot upload logo

    We are having the same issue on CentOS 5.1 with the new version of SugarCRM 5.0.0b. Any help is appreciated.

  9. #9
    hubcrm is offline Sugar Community Member
    Join Date
    Dec 2006
    Location
    Surrey - UK
    Posts
    90

    Default Re: Cannot upload logo

    Same issue with images rendered by Fireworks, Photoshop and GIMP.........just doesn't seem to work or like the format.

  10. #10
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: Cannot upload logo

    Had this issue too with a fresh install of 5.0.0b.

    The message "The file format of the image must be JPEG or PNG. Upload a new file with the file extension .jpg or .png" comes from module modules/Configurator/EditView.tpl

    In this module the file which should be uploades is checked with a php-function getimagesize.

    If you insert an alert message in the EditView.tpl like this:

    Code:
     function uploadCheck(quotes){
        //AJAX call for checking the file size and comparing with php.ini settings.
        var callback = {
             success:function(r) {
                 var file_type = r.responseText;
    //KUS             
                 alert("file_type("+file_type+")");
    //KUS             
                 if(file_type == 'empty'){
                 //field empty
                 }else{

    You will get the real reason for the bug, the alert shows:

    file_type(<br />
    <b>Warning</b>: getimagesize("D:\sugarcrm\my_logo.png)[a href='function.getimagezize</a>]:failed to open stream: No such file or directory in <b>D:\SUGAR-xampp\htdocs\sugar500b\modules\Configurator\Upload FileCheck.php</b> on line <b>57</b><br />
    other)

    Now you can see that this is a bug in Sugar 5.0.0b, bcause the full qualified path of the file on the uploading client is checked. This is senseless, Sugar has no access to this file - execpt client and server are on the same machine.


    To solve this issue, you can copy the file to the same directory as your local directory and upload it then again. This will work. After uploading you can delete the directory again.


    I posted it as BUG # 20099
    Last edited by kuske; 2008-02-28 at 11:48 AM.

Page 1 of 4 1234 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Errors When I Try To Upload New Logo
    By netonemichigan in forum Help
    Replies: 3
    Last Post: 2007-12-06, 10:23 AM
  2. Replies: 13
    Last Post: 2007-10-22, 04:30 AM
  3. Upload - no upload, no error
    By appdev in forum Help
    Replies: 2
    Last Post: 2007-09-05, 04:53 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •