Unfortunately, the username and password you have entered do not match!

Registration

Unfortunately, this username is already taken!

Unfortunately, this e-mail address is already used!

Please retype the verification code.

All fields are required

Unable to Upload MP3 with File Upload Field?

Welcome, Guest
Username Password: Remember me

Unable to Upload MP3 with File Upload Field?
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Unable to Upload MP3 with File Upload Field?

Unable to Upload MP3 with File Upload Field? 3 years, 5 months ago #4157

  • webgyrl
  • 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

Re:Unable to Upload MP3 with File Upload Field? 3 years, 5 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 \&quot;audio/mpeg\&quot;. 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 \&quot;form\&quot;) and the name of the upload field, in a strange order - the attribute is second, after \&quot;form\&quot; and before the field name. For example:
[code]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;

Re:Unable to Upload MP3 with File Upload Field? 3 years, 5 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.

Re:Unable to Upload MP3 with File Upload Field? 3 years, 5 months ago #4238

  • webgyrl
  • 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&gt;

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?

Re:Unable to Upload MP3 with File Upload Field? 3 years, 5 months ago #4261

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

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 \&quot;Return URL\&quot; - 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.

Re:Unable to Upload MP3 with File Upload Field? 1 year, 6 months ago #11092

what is the path that you have used to upload files onto the server??

Re:Unable to Upload MP3 with File Upload Field? 6 hours, 1 minute ago #0

Hello,
This is an automatically generated message.
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 wish to receive our 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: http://www.rsjoomla.com/support-policy.html.

Thank You!
PLEASE NOTE: This topic is NOT locked and you can add replies to it. Other users are free to reply as well. This message has been generated by a bot and has no effect on the topic whatsoever.
  • Page:
  • 1
Moderators: alex, alexp, octavian, bogdanc, andreic
Time to create page: 0.81 seconds
Feedback