image upload buttons are missing in magento in back end

29,125

Solution 1

These buttons are coming from flash.So check your media folder on following location

design/adminhtml/default/default/template/media

if there is no media folder then copy from fresh magento

This will solve your problem :)

Solution 2

Go to chrome://settings/content/flash Add you website url in allow tag

Then refresh your admin panel

Solution 3

Magento image uploading issue is related to flash. You need to change the settings of your browser. If you are using chrome,

  1. Go chrome settings, or by typing chrome://settings/content
  2. Go to Content settings => flash
  3. Turn on Allow site to run flash
  4. Turn off ask first

And in Firefox, you don't need to do anything, if your flash player is outdated, you need to update it

Solution 4

if git is used It's also a good to check .gitignore. it's easy to ignore "media/" instead of "/media/". Deeper media directory contains swf upload buttons.

Solution 5

The upload button is not displayed if JavaScript Variables maxUploadFileSizeInBytes and maxUploadFileSize are not properly configured in the following files:

  • /app/design/adminhtml/default/default/template/media/uploader.phtml
  • /app/design/adminhtml/default/default/template/media/cms/browser/content/uploader.phtml

The variables are declared as follows:

maxUploadFileSizeInBytes = <?php echo $this->getDataMaxSizeInBytes() ?>;
maxUploadFileSize = '<?php echo $this->getDataMaxSize() ?>';

You can directly edit:

maxUploadFileSizeInBytes = 10485760; /* 10.48576 MB */
maxUploadFileSize = '104857600';

The getDataMaxSizeInBytes() and getDataMaxSize() are defined in the file:

  • /app/code/core/Mage/Adminhtml/Block/Media/Uploader.php

If your server is running with HHVM, the parameters PHP post_max_size and upload_max_filesize are available under the names hhvm.server.max_post_size and hhvm.server.upload.upload_max_file_size.

For this he will have to modify the appeal of these parameters in the php file Uploader.php, here's how:

Copy the file in the Local Uploader.php architecture:

  • /app/code/local/Mage/Adminhtml/Block/Media/Uploader.php

replace the following lines:

public function getPostMaxSize()
{
    return ini_get('post_max_size');
}

public function getUploadMaxSize()
{
    return ini_get('upload_max_filesize');
}

by the following:

public function getPostMaxSize()
{
    $post_max_size = ini_get('post_max_size');
    return $post_max_size ? $post_max_size : ini_get('hhvm.server.max_post_size');
}

public function getUploadMaxSize()
{
    $upload_max_filesize = ini_get('upload_max_filesize');
    return $upload_max_filesize ? $upload_max_filesize : ini_get('hhvm.server.upload.upload_max_file_size');
}

Cordially. G

Share:
29,125
prasadmsvs
Author by

prasadmsvs

Working as a software engineer

Updated on March 29, 2020

Comments

  • prasadmsvs
    prasadmsvs about 4 years

    I am new to Magento...Installed 1.7 community Edition.

    I have heard great deal about it and so far I was not impressed..anyway I am trying to add images to a Product but 'Browse files' and 'Upload' buttons are missing from the backend.

    I have tried several solutions from online like:
    -copying 'media' folder from 'adminhtml' folder to 'frontend',
    -clearing caches,
    -reforming indices,
    -upgrading to latest flash player.

    Nothing seems to work. If any one found solution to this problem please let me know.

  • Andy
    Andy over 8 years
    There is a good chance you are missing both skin/adminhtml/default/default/media and design/adminhtml/default/default/template/media
  • GalAbra
    GalAbra about 6 years
    Welcome to Stack Overflow. Please note that this question was already answered - no need to repeat and add redundant data. Good luck!
  • Akash lal
    Akash lal about 6 years
    may I know who are you?