Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I need the name of the file downloaded
Message
De
13/03/2017 15:17:49
 
 
À
13/03/2017 13:47:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Divers
Thread ID:
01648981
Message ID:
01648989
Vues:
41
Yeah! That's it!

Muito obrigado!


>>Hi friends
>>
>>This is the point: The instructions below download a PDF file with information about a fiscal key (cCuit)
>>
>>oconstancia = Createobject("Shell.Application")
>>oconstancia.Open("https://soa.afip.gob.ar/sr-padron/v1/constancia/"+STRTRAN(cCUIT,'-',''))
>>
>>Since the file is downloaded (and opened) in the default download fold I could research using environment variables and somehow I could get the data I desire: THE NAME OF THE FILE
>>
>>But there should be a better method I don't know without opening the file and that's why I'm here right now...
>>
>>The instruction below puts MY specified name, and that's not what I want.
>>
>>lnGetResults = URLDownloadToFile(0, lcGetURL, lcTempTxtFile, 0, 0)
>>
>>Does anyone know how I cant obtain the name of the file downloaded?
>>
>>Thank you.
>>
>> Héctor
>
>If the name of the file is passed by the web service, then most probably it is coming downstream in the response header.
>
>
>CLEAR
>
>LOCAL SXMLHTTP AS MSXML2.ServerXMLHTTP60
>
>m.SXMLHTTP = CREATEOBJECT("MSXML2.ServerXMLHTTP.6.0")
>m.SXMLHTTP.Open("GET", ""https://soa.afip.gob.ar/sr-padron/v1/constancia/" + STRTRAN(m.cCUIT, '-' ,''), .F.)
>m.SXMLHTTP.Send()
>? m.SXMLHTTP.Getresponseheader("Content-Disposition")
>WAIT WINDOW "Press a key..."
>?
>? m.SXMLHTTP.Responsebody
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform