Print Page | Close Window

Downloadable Product File Sizes

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Suggestions
Forum Description: ProductCart Suggestions
URL: https://forum.productcart.com/forum_posts.asp?TID=3068
Printed Date: 27-June-2024 at 2:07pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Downloadable Product File Sizes
Posted By: Benissimo
Subject: Downloadable Product File Sizes
Date Posted: 28-September-2009 at 2:08pm
The maximum 4MB "hidden url" option is much too small for us.

We fortunately have Persit's ASPUpload component onboard that securely downloads large files as a binary stream.  Touching up the "downloadFile(strFile)" function in /pc/downloadnow.asp as follows did the trick:

Dim objUpload
Set objUpload = Server.CreateObject("Persits.Upload")
objUpload.SendBinary strFilename, True, "application/octet-binary", True
Set objUpload = Nothing

If you had a component check for downloadable products, it would be nice not to be hampered by the 4MB maximum file size limitation without code changes.

Just a thought.

Cheers



Replies:
Posted By: Greg Dinger
Date Posted: 28-September-2009 at 2:35pm
Nice to hear.  Thanks for posting this.  I've bumped up against this issue and appreciate your input.

-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: Guests
Date Posted: 28-September-2009 at 3:50pm
Nice tip, Benisimo.
 
The technical issue is that without the use of a 3rd party component, IIS can only push 4 MB of data in a single response by default (the IIS metabase can be edited to change that, but that might not be the best idea depending, and is very unlikely to be an option on shared hosting servers).
 
Most folks running PC should probably be on servers running Persist's ASPUpload, so they should be able to make use of this.


Posted By: kcramer
Date Posted: 08-November-2009 at 9:50am
We have the same problem with the 4MB limitation. 4MB is much too small for the downloadable product we're planning to release later this month.
 
I have one question:
 
Where in the downloadnow.asp file should we add the code mentioned at the beginning of this thread? Our server is running Persit's ASPUpload, so hopefully this solution will solve the problem of the 4MB limitation.
 
I'm not a programmer, but if it's a matter of copying and pasting this code to add it into the file, or using this code to replace some of the code that's already in the file, I can manage that if someone would be kind enough to let me know exactly where to put it.
 
Thanks in advance for any help!
 
~ Kristen


Posted By: BrianRoden
Date Posted: 12-November-2009 at 11:23am
As Kristen requested above, please post more detail on the modifications to the downloadFile() function. Which lines of downloadnow.asp are you replacing with this code?


Posted By: Benissimo
Date Posted: 27-August-2010 at 4:23pm
Sorry about the late reply, here's how I plugged the code into the script /pc/downloadnow.asp:

On Line 119, there is this five lines of code:

' send the headers to the users browser
Response.AddHeader "Content-Disposition", "attachment; filename=" & FileName1
Response.AddHeader "Content-Length", intFilelength
Response.Charset = "UTF-8"
Response.ContentType = "application/octet-stream"

Comment this out and enter this code instead:

Dim objUpload
Set objUpload = Server.CreateObject("Persits.Upload")
objUpload.SendBinary strFilename, True, "application/octet-binary", True
Set objUpload = Nothing

That's it and of course, you'll need the ASPUpload component installed on the web server. The component should theoretically cater to any file size you want, in our case the files were around 2GB's and it worked fine. To find out more about this component and how much it costs, go here:

http://www.aspupload.com/ - http://www.aspupload.com/

Cheers



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net