• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Unable to Upload MP3 with File Upload Field?

Unable to Upload MP3 with File Upload Field? 16 years 8 months ago #4157

  • webgyrl
  • webgyrl's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Hello!

I am testing the trial version of this form for a client of mine. He runs a studio and needs people to be able to upload Mp3, WAV etc files.

I am testign the form with the following in the setup
Field Type: file upload
Default Value: audio/x-wav,audio/mpeg

I am getting this error message when I press \"Submit\":
This file format is not allowed for upload.

Why am I getting this message? Does this have anythign to do with allowed file formats within Joomla? I know to allow MP3s etc in the Media Uploads I have to change admin.media.php

Any ideas?

Thanks<br><br>Post edited by: webgyrl, at: 2008/08/15 06:33
The administrator has disabled public write access.

Re:Unable to Upload MP3 with File Upload Field? 16 years 8 months ago #4181

I am successfully uploading MP3 files myself, so perhaps I can help.

In RSForm, in the Default Value for the field itself, you have to specify what file type(s) you want to accept - for MP3s, it is \"audio/mpeg\". You can optionally also specify the maximum size, as long as your php.ini setting for upload_max_filesize is big enough. Something like audio/mpeg,size/20000 or whatever size you want.

I had a struggle figuring out the right array syntax for my processing script, but I finally got it to work. The $_FILES superglobal includes both the name of the form (which is apparently just \"form\") and the name of the upload field, in a strange order - the attribute is second, after \"form\" and before the field name. For example:
if ($_FILES['form']['tmp_name']['mp3file']) { if (!move_uploaded_file($_FILES['form']['tmp_name']['mp3file'], $mypath.$_FILES['form']['name']['mp3file'])) { die(\&quot;Failure copying file.\&quot;[code]if ($_FILES) {
if (!move_uploaded_file($_FILES, $mypath.$_FILES)) {
die(\"Failure copying file.\"
The administrator has disabled public write access.

Re:Unable to Upload MP3 with File Upload Field? 16 years 8 months ago #4182

Oops! I just noticed that you already said in your first post that you specified the file types in the Default Value - sorry to repeat what you already knew. In that case, I don't know what is causing the error you are getting. I have a pretty default Joomla and RSForm installation, and it works fine for me. I did pay and therefore have a non-trial version, but I would think that if they were disallowing uploads in the trial version, the error message would be more to that effect.
Anyway, perhaps my other comments in my first post will have helpful if you get past your current problem.
The administrator has disabled public write access.

Re:Unable to Upload MP3 with File Upload Field? 16 years 8 months ago #4238

  • webgyrl
  • webgyrl's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Hi Osaka! Well I spoke with my client and he told me that the form has to be in 3 parts... he is not using the form to upload the music. The form should auto forward the person to a Paypal payment page and then from Paypal go to the file service YouSendIt.com. So i am working on all that.

I really appreciate your detailed answer.

May I ask, are you a coder and did you have to hand code all that other stuff>

I am not sure what to do to make sure the form directs to the Paypal payment page when they have finished sending the form. I have no idea what to do to make that happen. Any ideas where I could start to learn?
The administrator has disabled public write access.

Re:Unable to Upload MP3 with File Upload Field? 16 years 8 months ago #4261

May I ask, are you a coder and did you have to hand code all that other stuff>
Yes, I'm a coder, among other things (my title is actually missionary, but my tech background has come in very handy, and I spend a lot of my time doing these sorts of things). One thing I do is currently maintain six websites by hand, but I'd like to migrate some of them to Joomla so that non-programmers can take over the day-to-day content maintenance. That migration is in the early stages.

Okay, I'll ask you a question, too: your handle would give the impression that you, like myself, belong to the decisively minority gender on tech forums. Is that true? ;)
I am not sure what to do to make sure the form directs to the Paypal payment page when they have finished sending the form. I have no idea what to do to make that happen. Any ideas where I could start to learn?
Well, on the Form Edit tab there is a \"Return URL\" - that would be the first thing to try. I know you'll need the URL to be dynamic, because you need to tell Paypal some specifics, but you can include hidden field(s) in your form and then set their value in your processing script - even though the form is already submitted, I suspect the array holding the submitted values is what the Return URL code will use after your script is run, so if you change the value of parts of that array, my guess is that it will respond.

If that doesn't work, you could use the brute force method - in the processing script include echo statements that prepare Javascript code to be run when the page finishes loading, which contain a manual redirect to whatever you need. Those are my thoughts.
The administrator has disabled public write access.

Re:Unable to Upload MP3 with File Upload Field? 14 years 9 months ago #11092

what is the path that you have used to upload files onto the server??
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!