Web Connection
Looking for a suggestion on managing downloads for end users
Gravatar is a globally recognized avatar based on your email address. Looking for a suggestion on managing downloads for end users
  Michael B
  All
  Oct 16, 2020 @ 07:21am

Rick,

Just curious how you manage exporting csv files that are non critical (does not need to be saved permanently). Would you export the file to disk and give user a link to it, or would you create it, zip it, send it, and delete the traces of it when done?

Thanks!

Gravatar is a globally recognized avatar based on your email address. re: Looking for a suggestion on managing downloads for end users
  Tore Bleken
  Michael B
  Oct 16, 2020 @ 07:32am

The latter. Or ask my clients what they prefer.

Gravatar is a globally recognized avatar based on your email address. re: Looking for a suggestion on managing downloads for end users
  Rick Strahl
  Michael B
  Oct 16, 2020 @ 07:57pm

Whenever possible I prefer sending data in the same request. It's easier to manage and there's less risk that files end up sticking around after they're no longer in use.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Looking for a suggestion on managing downloads for end users
  Michael B
  Rick Strahl
  Oct 18, 2020 @ 09:39am

Hi Rick,

I discovered your function downloadFile() but when I use it, it opens excel with a blank sheet. Yes I confirmed that the file I am trying to send to the browser exists and I am sending the path propertly. While debugging I discovered a reference to WC_TRANSMITFILE which appears to be used in the webconnectionmodule.xml file which my older install does not use.

Any simple way to 'force' this to work?

Gravatar is a globally recognized avatar based on your email address. re: Looking for a suggestion on managing downloads for end users
  Rick Strahl
  Michael B
  Oct 18, 2020 @ 03:55pm

You're probably using an ancient version of wc.dll that doesn't support the protocol for file downloads that WWWC uses. I can't even remember if that's supported by by WC.dll at all, it might only work with the .NET Module.

Basically the FoxPro App returns a custom string that contains the file to download and the handler then fixes that up into an actual download send file command.

You need to check with Fiddler what actually gets sent. If you see WC_DOWNLOADFILE or something like that you know the version of the dll you're using is not current.

+++ Rick ---

© 1996-2024