Can't upload mp3 files

Discuss the development and implementation of Joomla! bots/Plugins here.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
imfritzy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 116
Joined: Mon Nov 06, 2006 10:57 pm

Can't upload mp3 files

Post by imfritzy » Mon Nov 20, 2006 4:50 pm

I'm relatively new at this and hope someone can help.

Here's my goal:  to upload mp3 files onto my website as "media content" so that any visitor to the site can see the title of the file,  click on the link and listen to the music
.
Here's the problem:  everytime I try to upload the mp3 file, I get a message that says "file type is not supported."

Here's what I have done so far:
1)  I installed onto the host/server of my website a patch for Joomla 1.0.11 called "admin.mambots.php"
2)  I installed and published the mambots Mini MP3 Player and Mini MP3 Player Extern using Joomla Administrator.
3)  I tried to upload my mp3 file from my hard drive but got the "file type is not supported" message.

I've been told that I need to write and publish the content for a mambot string but I don't know what that means.  What is the content?  Where does it get published?  How does it get published?  What does this content do?  What do I do next?

Any help would be greatly appreciated.

fotisevangelou
Joomla! Ace
Joomla! Ace
Posts: 1423
Joined: Sun Jan 22, 2006 6:27 pm
Contact:

Re: Can't upload mp3 files

Post by fotisevangelou » Tue Nov 21, 2006 3:14 pm

Modify the file: administrator/components/com_media/admin.media.php

...around lines 174 to 192...

Code: Select all

$allowable = array (
      'bmp',
      'csv',
      'doc',
      'epg',
      'gif',
      'ico',
      'jpg',
      'odg',
      'odp',
      'ods',
      'odt',
      'pdf',
      'png',
      'ppt',
      'swf',
      'txt',
      'xcf',
      'xls'
   );
...and add the filetypes needed, like mp3, flv etc.

And use AllVideos for audio and video streaming  :D
Fotis Evangelou / https://www.joomlaworks.net

imfritzy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 116
Joined: Mon Nov 06, 2006 10:57 pm

Re: Can't upload mp3 files

Post by imfritzy » Tue Nov 21, 2006 3:19 pm

Thanks. 

I modified the file as you suggested and now I get a new error message:  "Upload Failed."  My mp3 file is only 2MB in size.  Any thoughts on how I can resolve this new problem?

fotisevangelou
Joomla! Ace
Joomla! Ace
Posts: 1423
Joined: Sun Jan 22, 2006 6:27 pm
Contact:

Re: Can't upload mp3 files

Post by fotisevangelou » Tue Nov 21, 2006 3:20 pm

imfritzy wrote: Thanks. 

I modified the file as you suggested and now I get a new error message:  "Upload Failed."  My mp3 file is only 2MB in size.  Any thoughts on how I can resolve this new problem?
Perhaps you have a limitation in your server configuration for file uploads. Do you have a php.ini file in your account?
Fotis Evangelou / https://www.joomlaworks.net

imfritzy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 116
Joined: Mon Nov 06, 2006 10:57 pm

Re: Can't upload mp3 files

Post by imfritzy » Tue Nov 21, 2006 4:34 pm

Yes, I do.  Here is the contents of the file "php.ini":

; Transparent output compression using the zlib library
; Valid values for this option are 'off', 'on', or a specific buffer size
; to be used for compression (default is 4KB)
; Note: Resulting chunk size may vary due to nature of compression. PHP
;      outputs chunks that are few hundreds bytes each as a result of
;      compression. If you prefer a larger chunk size for better
;      performance, enable output_buffering in addition.
; Note: You need to use zlib.output_handler instead of the standard
;      output_handler, or otherwise the output will be corrupted.
zlib.output_compression = On

; You cannot specify additional output handlers if zlib.output_compression
; is activated here. This setting does the same as output_handler but in
; a different order.
zlib.output_handler =


Now, I don't know what any of that means.  Does this help you assess my problem? 

fotisevangelou
Joomla! Ace
Joomla! Ace
Posts: 1423
Joined: Sun Jan 22, 2006 6:27 pm
Contact:

Re: Can't upload mp3 files

Post by fotisevangelou » Tue Nov 21, 2006 4:51 pm

Add this at the bottom:

Code: Select all

upload_max_filesize = 16M
;)
Fotis Evangelou / https://www.joomlaworks.net

imfritzy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 116
Joined: Mon Nov 06, 2006 10:57 pm

Re: Can't upload mp3 files

Post by imfritzy » Tue Nov 21, 2006 6:45 pm

Thank you!  I've been struggling with this for weeks and your suggestion worked!  Thanks again.

fotisevangelou
Joomla! Ace
Joomla! Ace
Posts: 1423
Joined: Sun Jan 22, 2006 6:27 pm
Contact:

Re: Can't upload mp3 files

Post by fotisevangelou » Tue Nov 21, 2006 8:13 pm

imfritzy wrote: Thank you!  I've been struggling with this for weeks and your suggestion worked!  Thanks again.
;)
Fotis Evangelou / https://www.joomlaworks.net

imfritzy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 116
Joined: Mon Nov 06, 2006 10:57 pm

Re: Can't upload mp3 files

Post by imfritzy » Tue Nov 28, 2006 3:03 pm

I have one more question...  When users of my website click on the mp3 file that I've uploaded to the site, their computers download the mp3 file to their local computer, and then the users must open up their local mp3 players to play the file.  I thought that by installing the AllVideos plug-in (which I have done), or Mini MP3 Player, the mp3 files would be played directly off the website (I guess that would be called streaming), without the need for the user's local computer to download the file and use a local mp3 player.  Otherwise, what is the point of installing the plug-in as a mambot?

Can you educate me a bit more on this?  Thank you.

fotisevangelou
Joomla! Ace
Joomla! Ace
Posts: 1423
Joined: Sun Jan 22, 2006 6:27 pm
Contact:

Re: Can't upload mp3 files

Post by fotisevangelou » Wed Nov 29, 2006 8:06 am

imfritzy wrote: I have one more question...  When users of my website click on the mp3 file that I've uploaded to the site, their computers download the mp3 file to their local computer, and then the users must open up their local mp3 players to play the file.  I thought that by installing the AllVideos plug-in (which I have done), or Mini MP3 Player, the mp3 files would be played directly off the website (I guess that would be called streaming), without the need for the user's local computer to download the file and use a local mp3 player.  Otherwise, what is the point of installing the plug-in as a mambot?

Can you educate me a bit more on this?  Thank you.
AllVideos streams mp3 directly. It does not provide download links.

Please install it and read the documentation VERY CAREFULLY. Then you'll know how to add MP3s in your site.
Fotis Evangelou / https://www.joomlaworks.net

imfritzy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 116
Joined: Mon Nov 06, 2006 10:57 pm

Re: Can't upload mp3 files

Post by imfritzy » Wed Nov 29, 2006 6:11 pm

Thanks.

Well, I've feeling pretty stupid here.

Here's what I've done:

After reading the AllVideos very clear instructions very carefully,

1)  I've stored my mp3 files in a folder in Media Manager called "audio".
2)  I've set the parameters of the AllVideos plug-in so the "local audio folder" is "audio/"  (I've also tried setting it to "images/audio/")
3)  And I've added to my published content the string "{mp3}filename{/mp3}"  (I used the actual name of the file, without including the ".mp3" suffix)

When I access the content as a user would, the icon of the mp3 player appears on the screen but it doesn't play any music from the file.

Do you have any thoughts on what I've done wrong?

Sorry for the prolonged questions...

fotisevangelou
Joomla! Ace
Joomla! Ace
Posts: 1423
Joined: Sun Jan 22, 2006 6:27 pm
Contact:

Re: Can't upload mp3 files

Post by fotisevangelou » Wed Nov 29, 2006 6:20 pm

You need to just add "audio" (without the quotes) as the master audio folder. The path is wrong, that is the problem...
Fotis Evangelou / https://www.joomlaworks.net

imfritzy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 116
Joined: Mon Nov 06, 2006 10:57 pm

Re: Can't upload mp3 files

Post by imfritzy » Wed Nov 29, 2006 6:28 pm

Thanks -- I wish that  were my problem.  I had not been using quotes in the parameters box (just in my posted message -- for an attempt at clarity).  So the path I am using is simply: 

audio/


Are there other parameters I should have adjusted?  I know that the mp3 file plays off other players like RealPlayer so I don't think there is a problem with the mp3 file itself.

fotisevangelou
Joomla! Ace
Joomla! Ace
Posts: 1423
Joined: Sun Jan 22, 2006 6:27 pm
Contact:

Re: Can't upload mp3 files

Post by fotisevangelou » Wed Nov 29, 2006 7:01 pm

That's what I'm saying!!! You need to simpl add:

audio

without any slashes!! Please see the tooltip text when hovering your mouse over "Master Audio Folder" option, in the plugin's parameters page!!
Fotis Evangelou / https://www.joomlaworks.net

imfritzy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 116
Joined: Mon Nov 06, 2006 10:57 pm

Re: Can't upload mp3 files

Post by imfritzy » Wed Nov 29, 2006 8:27 pm

Yep -- I've tried exactly what you've suggested and still no luck.  I keep checking and double-checking my strings and parameters, looking for a flaw or inconsistency, but can't find it.  Very frustrating...

imfritzy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 116
Joined: Mon Nov 06, 2006 10:57 pm

Re: Can't upload mp3 files

Post by imfritzy » Wed Nov 29, 2006 9:24 pm

Never mind -- I figure out the problem.  I needed to adjust the path for the Local Video Folder as well as the path for the Local Audio Folder, even though I was just trying to play an mp3 file.

Anyway, it's working!

User avatar
Fredman
Joomla! Intern
Joomla! Intern
Posts: 76
Joined: Wed Nov 29, 2006 6:28 am
Location: Nebraska
Contact:

Re: Can't upload mp3 files

Post by Fredman » Sat Dec 09, 2006 9:48 pm

Let me chime in:
On some server web hosts, they have their upload file size limit set at 2mb as was noted above, and the way to get around that was also noted above, but in some cases (I was told) you need two lines in the customized PHP Script in order to upload anything OVER 8mb, and it's these two lines:

// comment code to add is next
$parm[]="upload_max_filesize=8m";
$parm[]="post_max_size=16m";
// comment code ends                 

Or I take it the post max size can be anything you want, within reason of course.

I hope someone with PHP experience can confirm this or correct this, but it worked for me.
http://www.site5.com is who hosts my website, they are awesome

imfritzy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 116
Joined: Mon Nov 06, 2006 10:57 pm

Re: Can't upload mp3 files

Post by imfritzy » Wed Dec 13, 2006 10:01 pm

Thank you -- I'll keep this in mind in case future problems arise (as they invariably do).

Catrin
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Nov 01, 2007 3:29 pm

Re: Can't upload mp3 files

Post by Catrin » Thu Nov 01, 2007 4:01 pm

Hi,

I have problems to upload mp3 files to use with Advanced mp3 Player.

I´m trying to do as was previously suggested in this topic, but when I try to over write the  admin.media.php with the modified file, but it gives me report

ERROR(S):
admin.media.php : File upload failed.

How should I do it?

Very beginner in Joomla  ???

fotisevangelou
Joomla! Ace
Joomla! Ace
Posts: 1423
Joined: Sun Jan 22, 2006 6:27 pm
Contact:

Re: Can't upload mp3 files

Post by fotisevangelou » Sun Nov 04, 2007 10:44 am

Prefer not to hack the joomla core code when solutions are available :)

More here: http://extensions.joomla.org/component/ ... Itemid,35/

Upload any file with this component ;)
Fotis Evangelou / https://www.joomlaworks.net

gonzalocalle
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Mon Feb 15, 2010 6:40 am

Re: Can't upload mp3 files

Post by gonzalocalle » Sun Aug 15, 2010 1:00 am

Hi, I have the same problem.
I follwed your advice but could not find the /adm_media.php file

Quiiger
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Oct 24, 2010 9:29 pm

Re: Can't upload mp3 files

Post by Quiiger » Sun Oct 24, 2010 9:32 pm

Hi,

I have the same problem I can't find the "administrator/components/com_media/admin.media.php" directory, it says, The requested URL /administrator/components/com_media/admin.media.php was not found on this server.

Help please!

Sujains4445
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Nov 10, 2010 6:47 am

Re: Can't upload mp3 files

Post by Sujains4445 » Wed Nov 17, 2010 12:33 pm

When i try to add an mp3 i get the error message "The filetype you are trying to add is not allowed". Below is my code for my model and my form (i've got a really skinny controller). If someone could assist me out with this I'd be eternally grateful.

--Model--

Code: Select all

	
function do_upload()
{

        $soundfig['upload_path'] = './uploads/nav';
        $soundfig['allowed_types'] = 'mp3';

        $this->load->library('upload', $soundfig);

        if ( ! $this->upload->do_upload())
        {
            $error = array('error' => $this->upload->display_errors());

            return $error;
        }   
        else
        {

            /* $data = $this->upload->data('userfile'); */
            $sound = $this->upload->data();
            /* $full_path = 'uploads/nav/' . $data['file_name']; */
            $sound_path = 'uploads/nav/' . $sound['file_name'];

            if($this->input->post('active') == '1'){
                $active = '1';
            }else{
                $active = '0';
            }

            $spam = array(
                /* 'image_url' => $full_path, */
                'sound' => $sound_path,
                'active' => $active,
                'url' => $this->input->post('url')
            );

            $id = $this->input->post('id');

            $this->db->where('id', $id);
            $this->db->update('NavItemData', $spam);

            return true;

    }
}
--View - Form--

Code: Select all

<?php echo form_open_multipart('upload/do_upload');?>
<?php if(isset($buttons)) : foreach($buttons as $row) : ?>
<h2><?php echo $row->name; ?></h2>
<!-- <input type="file" name="userfile" size="20" /><br /> -->
<input type="file" name="userfile" size="20" />
<input type="hidden" name="oldfile" value="<?php echo $row->image_url; ?>" />
<input type="hidden" name="id" value="<?php echo $row->id; ?>" />

<br /><br />
<label>Url: </label><input type="text" name="url" value="<?php echo $row->url; ?>" /><br />
<input type="checkbox" name="active" value="1" <?php if($row->active == '1') { echo 'checked'; } ?> /><br /><br />
<input type="submit" value="submit" />

</form>

<?php endforeach; ?>
<?php endif; ?>

myjoomla
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Mon May 12, 2008 9:18 am

Re: Can't upload mp3 files AND I can't finde the admin.media

Post by myjoomla » Mon Sep 19, 2011 7:36 pm

I have the same problem with uploading mp3, and getting the same "This file type is not supported."
BUT when I tried to fix it as it mentioned here I discovered that I don't have an admin.media.php file...
PLEASE HELP ME! I don't know what to do in this case!
If you know a solution please present it step by step so I understand :)
THANK YOU FOR TAKING YOUR TIME !!!

Jasontuck
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Mon Mar 05, 2012 3:21 pm

Re: Can't upload mp3 files AND I can't finde the admin.media

Post by Jasontuck » Wed May 23, 2012 5:07 pm

myjoomla wrote:I have the same problem with uploading mp3, and getting the same "This file type is not supported."
BUT when I tried to fix it as it mentioned here I discovered that I don't have an admin.media.php file...
PLEASE HELP ME! I don't know what to do in this case!
If you know a solution please present it step by step so I understand :)
THANK YOU FOR TAKING YOUR TIME !!!
Are you sure you are using the correct Joomla version? admin.media.php should be in a default package afaik.

boiler
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Tue May 13, 2008 1:41 am
Location: Indonesia
Contact:

Re: Can't upload mp3 files AND I can't finde the admin.media

Post by boiler » Wed Jun 06, 2012 7:32 am

Jasontuck wrote:
myjoomla wrote:I have the same problem with uploading mp3, and getting the same "This file type is not supported."
BUT when I tried to fix it as it mentioned here I discovered that I don't have an admin.media.php file...
PLEASE HELP ME! I don't know what to do in this case!
If you know a solution please present it step by step so I understand :)
THANK YOU FOR TAKING YOUR TIME !!!
Are you sure you are using the correct Joomla version? admin.media.php should be in a default package afaik.
I guess he had not uploading the joomla source properly :)
http://healthcareoasis.com - Healthy Living Source and Health News
http://www.maniakhost.com - Hosting Indonesia

haglis
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Nov 05, 2013 2:50 pm

Re: Can't upload mp3 files

Post by haglis » Tue Nov 05, 2013 3:34 pm

Hi All,

I am having the same issue as previously discussed by others, however I am unsure of how to access the administrator/components/com_media/admin.media.php file as I am doing some volunteer work for our local dyslexia charity here in Aberdeen Scotland as our usual guy is off getting married in India at the moment.

I have access to the Joomla admin panel so can upload media, add plugins etc, but am not sure I can change the php file to allow mp3s to be uploaded as I checked in the Media Manager and it obviously only shows the media folders.

My ultimate goal is to have a song by one of our kids to be available to listen to on the website, by any means available. The song is currently in mp3 format but I dont really care what format is used as long as it will play.

I have seen that I will probably also have to install the AllVideos plug-in but was wondering if the latest version is backward compatible with Joomla v1.7 that we are currently using.

I have a bit of knowledge on this but very little practical experience, so any help or advice would be most appreciated.

I realise this is a big ask but I need all the help I can get especially as its Dyslexia awareness week here this week.

Thanks in advance, George.


Locked

Return to “Plugins/Mambots”