FoxPro Programming
Possible to receive and convert > 16 mb file from web server
Gravatar is a globally recognized avatar based on your email address. Possible to receive and convert > 16 mb file from web server
  Albert Gostick
  All
  Jan 4, 2019 @ 12:47pm

Hi all,

Just finished reading Rick's blog on > 16 mb files and then trying the .lUseLargePostBuffer property in wwhttp to post a > 16mb file to web server - works (how long has this been in there? did not see it until recently?). So I could change my code that uploads files to their document server to allow > 16mb.

But, not sure if I can download these large files. Before I spend a lot of time trying some test code, any idea if this is possible:

  • file is an xml stream which has the xml header and then tags for some meta data and then the actual binary is contained within tags eg.
<docid>12345...</docid>
<doctitle>Something warm and fuzzy.doc</doctitle>
<blob>...base64 encoded data...</blob>

So theoretically, if I brought down a string > 16mb, if I followed the rules outlined in the article and maybe dumped the string into a file, do you think I could pull out the blob and decode it? Or would pulling out the blob part using STREXTRACT and STRCONV() to decode not work.

Just thought I would ask instead of hitting my head against a wall...(the server api also has code to block downloads > 16 mb so harder to test).

Albert

Gravatar is a globally recognized avatar based on your email address. re: Possible to receive and convert > 16 mb file from web server
  Rick Strahl
  Albert Gostick
  Jan 5, 2019 @ 01:13pm

You can directly download to file to get the content down. Once it's in a file you can use the MSXML parser to get the content out I believe, but I'm not sure if that would work with >16meg strings. I think it should as long as it's a single value that's directly assigned to a variable. You should actually be able to pull this into a blob (type Q).

Haven't tried this but should be possible.

Worst case scenario I would build an intermediate .NET component that can pull the content in full size, process it and then either pass it back to you or store it into whatever data storage you need to put it. Using wwDotnetBridge that would be an easy workaround.

+++ Rick ---

© 1996-2019