close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Dynamic download issue

Thread began 5/21/2020 10:44 am by Jose | Last modified 5/21/2020 12:59 pm by Ray Borduin | 771 views | 9 replies |

Jose

Dynamic download issue

Hi there, I'm trying to create a dynamic download page but it doesn't work properly. I have test it many times and in my conclusion the download page work proper as static but when I bind the field from the Recordset its downloads an empty folder. I'm going to attach two example static works and dynamic not works.

Attached Files
testNotworks.php
testworks.php
Sign in to reply to this post

Ray BorduinWebAssist

If you write the filename to the page:

<?php echo($Product->getColumnVal("filename")); ?>

What is the value?

It must not be: "filename.zip"

Because that is the filename that works. I don't think the issue depends on if it is dynamic or not. It shouldn't matter as long as the correct file name is passed.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jose

Well, filename is just an example it could be any name but if I do something like this (<?php echo($Product->getColumnVal("filename")); ?>) I get the name of the file. For example: "gift.zip" and it doesn't work, I mean it download but empty. But if I put the name "gift.zip" instead of this ( "".($Product->getColumnVal("filename")) ."") then it works.

Sign in to reply to this post

Jose

I am uploading two file then I will leave those link so you can see the results.
This website has an example of the results you can know by clicking the button.
Here are the links
This works and will download or open the zip
http://www.azarosa.com/static.php
Do not work and will download an empty zip
http://www.azarosa.com/dynamic.php

Sign in to reply to this post

Ray BorduinWebAssist

There is no difference between a value from a database and a value that is typed in, so something must be different in the file name between the dynamic and hard coded version. If you give me FTP access then I could debug and find the difference.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jose

I agree with you. I Also tied this method (<?php echo($Product->getColumnVal("filename",false)); ?>) but not work
Well, I'll put FTP in PM down here.

Sign in to reply to this post

Ray BorduinWebAssist

You didn't include the FTP username

Sign in to reply to this post
Did this help? Tips are appreciated...

Jose

here you are.

Sign in to reply to this post

Ray BorduinWebAssist

This issue is caused by the extra space you have at the end of your assets/functions.php file.

You have added that file to your connections file, so once you add a connection, it gets added as well.

The extra space is written to the page before the download and corrupts the download file. If you remove that space the download will function properly.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jose

Thank you Ray. I appreciate it

Sign in to reply to this post
loading

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

Content

rating

Layout

rating

Ease of use

rating

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...