close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


File Upload / Download help

Thread began 3/13/2013 5:57 am by iainmacdonald331081 | Last modified 3/14/2013 1:37 pm by Jason Byrnes | 1756 views | 10 replies |


File Upload / Download help

I have had no problem uploading images, but am having trouble getting mp3 files to upload.

In testing it works with JPGs etc, but wondering if I need to specify other file types allowed somewhere before it will upload mp3? I've ruled out any file size limit issues.

Also having trouble with my file download button - all I've managed to get it to do is download the .php page, so hopefully something simple if it is downloading something. I've checked the folder and the contents in the folder.

One thing though - when I try to create the trigger, I don't see Button:download pressed as an option, so have been using Any Form Post.

Have attached copies of each page.

Thank you.

Sign in to reply to this post

Jason ByrnesWebAssist

You don't have the Web Images only option selected. So it is probably the file size of the MP3 that is causing the upload to fail.

There are a number of PHP Settings that can effect the maximum file size you will be able to upload.

see this page for details:

for the download problem:
1) Remove the form that is around the repeat region, and add a form around the download button

2) change the download button element from type="button"
<input type="button" id="download" value="Download" name="Download" />

to type="submit:
<input type="submit" id="download" value="Download" name="Download" />

3) Add a hidden element next to the download button and bind it's value to the file name column from the recordset.

4) In the download behavior, bind the file settings to the hidden element.

Sign in to reply to this post


Thanks Jason. I did initially get an error on the server:

413 - Request Entity too large

So I requested the host to increase the limit. They advised me that they'd increased the limit to 10MB (the sample files I have are around 3MB).

I've gone back to the hosts to double check they've changed any settings at their end. (I don't have access to the php.ini file)

Will have a look at the download stuff.

Sign in to reply to this post

Jason ByrnesWebAssist

the are probably only changing the upload_max_filesize setting.

the post_max_size size will probably also need to be inscreased, and depending on the network connection, you may also need to increase the max_input_time and the max_execution_time

Sign in to reply to this post


I've deleted the opening and closing form tags, and have this around my download button:

<form class="DetailsPage Basic_Default" id="Results_Basic_Default"name="Results_Basic_Default" method="post" action="<?php echo (htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)); ?>">
<input type="submit" id="download" value="Download" name="Download" /
<input type="hidden" value="" />

How am I binding its value again?

Was looking in the properties for a lightning bolt?

Sign in to reply to this post

Jason ByrnesWebAssist

if your using DW CS6, adobe have removed dynamic bindings from form elements.

using code view, open the bindings panel and select the file name column from the recordset, then drag it to the code and drop it between the quotes for the value.

Sign in to reply to this post


Thanks Jason - I did wonder.

The hosts have made the other changes, so the upload is all fine now too.

Sign in to reply to this post


Think I'm still not quite sure - am I associating the hidden field and / or the file in the download behaviour as the field in the table that stores the file name, or the file itself?

Have attached a revised version that I haven't got right.

Sign in to reply to this post

Jason ByrnesWebAssist

for the hidden element, expand the WADAMusic recordset, and use the file name column for it's value.

Sign in to reply to this post


Sorry Jason - still not getting it to work.

I have my form as:

<form id="form1_" name="form1" method="post" action="<?php echo (htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)); ?>">
<input type="submit" id="Download" value="Download" name="Download"/>
<input type="hidden" value="<?php echo($row_WADAMusic['Music']); ?>"/>

Although not sure what I need for the Form Action, if the behaviour is triggered by the button press? I've tried it with and without that form action

And then in the File Name for the behaviour, I've been trying each of:

<?php echo $row_WADAMusic['Music']; ?>

<?php echo $WA_DFP_DownloadStatus["WA_DownloadResult1"]["fileName"]; ?>

<?php echo((isset($_POST["Download"]))?$_POST["Download"]:"") ?>

But doesn't seem to do anything with any combination of the above.

Can I make sure I have those two parts correct and take it from there?

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...