none
Download files RRS feed

  • Question

  • Hi,

    I am using foxpro to download URL files. We are using XMLHTTP request processes for this. But if we give a URL such as a online Sharepoint URL file, which required user authentication, we can't download the file. How can we allow user to give credentials and then download the file using VFP?

    existing code we are using something like below.

    loXMLHTTP = CREATEOBJECT("MSXML2.XMLHTTP")

    loXMLHTTP.Open('HEAD',lcDownloadFileURL,.F.)
    loXMLHTTP.Send()

    Above send method will return errors if the url need to authenticate.

    Friday, June 12, 2015 4:17 AM

All replies

  • Hi,

    lox = CREATEOBJECT("inetctls.inet")
    lcSuff = lox.OpenURL("http://whatever.co.uk/suff.htm")
    STRTOFILE(lcStuff, "c:\data\myfile.htm")

    Monday, June 15, 2015 8:18 AM
  • Hi,

    This is not working for files which are authenticated. i.e. for example, if we have a PDF file in online sharepoint server, above saved pdf file cannot be opened.

    Is there any way to use ServerXMLHTTP requests?

    Wednesday, June 17, 2015 4:42 AM
  • Creative, have you made any progress with this issue?
    Thanks!

    Ed Price, Azure Development Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!

    Tuesday, December 20, 2016 5:46 AM
    Owner