Denisdh
asked on
How can I check the return of objBinaryStream.Write objXMLHTTP.responseBody to see if it's what I want?
Experts,
I have a function that I'm using to download images. I need to edit the URL so I try and get the large verion of the image URL I have. In some cases the largerURL is doesn't exists and I get an XML file returning an error.
Is it possible to check objBinaryStream.Write objXMLHTTP.responseBody to see if it's an image or an xml file?
If so how would I go about it? If not how can I cater for this problem?
I have a function that I'm using to download images. I need to edit the URL so I try and get the large verion of the image URL I have. In some cases the largerURL is doesn't exists and I get an XML file returning an error.
Is it possible to check objBinaryStream.Write objXMLHTTP.responseBody to see if it's an image or an xml file?
If so how would I go about it? If not how can I cater for this problem?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I've tried the following with no luck. <?xml is in the files that it downloads but this code doesn't seem to catch it.
Any other suggestions?
Open in new window