downloadexample does not work from web site

The sample app downloadexample works perfectly well locally, but generates an error on the downloaded file when deployed to linux server. The very same file when downloaded from localhost works, and not from remote.

For instance, I have a zip file which is 2,640,815 bytes. When I run downloadexample locally, I get a download identical to the original.
If I upload the file and the web app to my linux remote server, I download and get a file 2,630,673 bytes which does not open. I get a “Unable to expand” error.

Seems ShowURL(DownloadPage.LogoFile.URL) sends a truncated file to the browser. I want to use this to deliver software downloads on my site, but as it stands, this code is unusable. Or is the example app bugged and am missing something ?

I will very much appreciate any help in going around the bug, for instance by using binary stream or other method. Download through a web app is a great idea, it will be wonderful to get this working.

Thank you in advance.


I encountered problems deploying the downloading example supplied with Xojo. Seems to be related to the server itself, as it works fine on another; Would have liked some replies, but it feels very lonesome when nobody seems interested :frowning:

Tough to say. Keep in mind that WebFiles are currently loaded entirely into RAM before they are sent to be downloaded. If they are large, this could cause problems. Xojo apps are 32-bit and have a limited RAM footprint.

If you are using a separate web server such as Apache, it might be easier to just have the download file get served by Apache itself.

I tried today to run the XOJO download example and it failed right out of the box. Tried it in XOJO r2 and RB2012r2.1 with same results.

And while I’m here… is it possible to download a 700 kb PDF file from the server to client in RB2013.r2 or/and XOJO? So far I’m having no luck with that either. If PDF files are not allowed, I missed the memo and can’t find any filetype limitation in the LR

What are the results? What do you mean by failed? How did you test it?

Downloadable files are not restricted by file type.

The Uploading and Download Files webinar goes over this example in more detail and is available here: