The Joomla! Forum ™



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.



Post new topic Reply to topic  [ 26 posts ] 
Author Message
 Post subject: Can't upload mp3 files
PostPosted: Mon Nov 20, 2006 4:50 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Nov 06, 2006 10:57 pm
Posts: 116
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.


Top
 Profile  
 
PostPosted: Tue Nov 21, 2006 3:14 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Sun Jan 22, 2006 6:27 pm
Posts: 1404
Location: Athens, Greece
Modify the file: administrator/components/com_media/admin.media.php

...around lines 174 to 192...

Code:
$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

_________________
CTO at JoomlaWorks Ltd. http://www.joomlaworks.net
Managing Director at Nuevvo Webware Ltd. http://nuevvo.com
JoomlaDay Greece organizer


Top
 Profile  
 
PostPosted: Tue Nov 21, 2006 3:19 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Nov 06, 2006 10:57 pm
Posts: 116
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?


Top
 Profile  
 
PostPosted: Tue Nov 21, 2006 3:20 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Sun Jan 22, 2006 6:27 pm
Posts: 1404
Location: Athens, Greece
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?

_________________
CTO at JoomlaWorks Ltd. http://www.joomlaworks.net
Managing Director at Nuevvo Webware Ltd. http://nuevvo.com
JoomlaDay Greece organizer


Top
 Profile  
 
PostPosted: Tue Nov 21, 2006 4:34 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Nov 06, 2006 10:57 pm
Posts: 116
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? 


Top
 Profile  
 
PostPosted: Tue Nov 21, 2006 4:51 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Sun Jan 22, 2006 6:27 pm
Posts: 1404
Location: Athens, Greece
Add this at the bottom:

Code:
upload_max_filesize = 16M


;)

_________________
CTO at JoomlaWorks Ltd. http://www.joomlaworks.net
Managing Director at Nuevvo Webware Ltd. http://nuevvo.com
JoomlaDay Greece organizer


Top
 Profile  
 
PostPosted: Tue Nov 21, 2006 6:45 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Nov 06, 2006 10:57 pm
Posts: 116
Thank you!  I've been struggling with this for weeks and your suggestion worked!  Thanks again.


Top
 Profile  
 
PostPosted: Tue Nov 21, 2006 8:13 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Sun Jan 22, 2006 6:27 pm
Posts: 1404
Location: Athens, Greece
imfritzy wrote:
Thank you!  I've been struggling with this for weeks and your suggestion worked!  Thanks again.


;)

_________________
CTO at JoomlaWorks Ltd. http://www.joomlaworks.net
Managing Director at Nuevvo Webware Ltd. http://nuevvo.com
JoomlaDay Greece organizer


Top
 Profile  
 
PostPosted: Tue Nov 28, 2006 3:03 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Nov 06, 2006 10:57 pm
Posts: 116
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.


Top
 Profile  
 
PostPosted: Wed Nov 29, 2006 8:06 am 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Sun Jan 22, 2006 6:27 pm
Posts: 1404
Location: Athens, Greece
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.

_________________
CTO at JoomlaWorks Ltd. http://www.joomlaworks.net
Managing Director at Nuevvo Webware Ltd. http://nuevvo.com
JoomlaDay Greece organizer


Top
 Profile  
 
PostPosted: Wed Nov 29, 2006 6:11 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Nov 06, 2006 10:57 pm
Posts: 116
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...


Top
 Profile  
 
PostPosted: Wed Nov 29, 2006 6:20 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Sun Jan 22, 2006 6:27 pm
Posts: 1404
Location: Athens, Greece
You need to just add "audio" (without the quotes) as the master audio folder. The path is wrong, that is the problem...

_________________
CTO at JoomlaWorks Ltd. http://www.joomlaworks.net
Managing Director at Nuevvo Webware Ltd. http://nuevvo.com
JoomlaDay Greece organizer


Top
 Profile  
 
PostPosted: Wed Nov 29, 2006 6:28 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Nov 06, 2006 10:57 pm
Posts: 116
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.


Top
 Profile  
 
PostPosted: Wed Nov 29, 2006 7:01 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Sun Jan 22, 2006 6:27 pm
Posts: 1404
Location: Athens, Greece
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!!

_________________
CTO at JoomlaWorks Ltd. http://www.joomlaworks.net
Managing Director at Nuevvo Webware Ltd. http://nuevvo.com
JoomlaDay Greece organizer


Top
 Profile  
 
PostPosted: Wed Nov 29, 2006 8:27 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Nov 06, 2006 10:57 pm
Posts: 116
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...


Top
 Profile  
 
PostPosted: Wed Nov 29, 2006 9:24 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Nov 06, 2006 10:57 pm
Posts: 116
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!


Top
 Profile  
 
PostPosted: Sat Dec 09, 2006 9:48 pm 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Wed Nov 29, 2006 6:28 am
Posts: 76
Location: Nebraska
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


Top
 Profile  
 
PostPosted: Wed Dec 13, 2006 10:01 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Nov 06, 2006 10:57 pm
Posts: 116
Thank you -- I'll keep this in mind in case future problems arise (as they invariably do).


Top
 Profile  
 
PostPosted: Thu Nov 01, 2007 4:01 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Nov 01, 2007 3:29 pm
Posts: 2
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  ???


Top
 Profile  
 
PostPosted: Sun Nov 04, 2007 10:44 am 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Sun Jan 22, 2006 6:27 pm
Posts: 1404
Location: Athens, Greece
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 ;)

_________________
CTO at JoomlaWorks Ltd. http://www.joomlaworks.net
Managing Director at Nuevvo Webware Ltd. http://nuevvo.com
JoomlaDay Greece organizer


Top
 Profile  
 
PostPosted: Sun Aug 15, 2010 1:00 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Feb 15, 2010 6:40 am
Posts: 18
Hi, I have the same problem.
I follwed your advice but could not find the /adm_media.php file


Top
 Profile  
 
PostPosted: Sun Oct 24, 2010 9:32 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Oct 24, 2010 9:29 pm
Posts: 1
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!


Top
 Profile  
 
PostPosted: Wed Nov 17, 2010 12:33 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Nov 10, 2010 6:47 am
Posts: 4
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:
   
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:
<?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; ?>

_________________
http://www.ayresearch.com/counseling-and-psychotherapy/


Top
 Profile  
 
PostPosted: Mon Sep 19, 2011 7:36 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon May 12, 2008 9:18 am
Posts: 3
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 !!!


Top
 Profile  
 
PostPosted: Wed May 23, 2012 5:07 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Mar 05, 2012 3:21 pm
Posts: 11
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.


Top
 Profile  
 
PostPosted: Wed Jun 06, 2012 7:32 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue May 13, 2008 1:41 am
Posts: 22
Location: Indonesia
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ] 



Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group