I am setting up a REST server in node.js, the client is a windows tablet running VFP9
I am struggling with downloading files.
That's ok for text & strings and so far a zip file - seems ok. But not for images.
I send a request to the server for a file by name, server responds with "I got file"
I then send a GET request to download the file. The file is returned as a data string in the response. I guess that is how it's done?
Can not the file be attached to the response as an object? Or does the contents of the file need to be sent in a different format server side?
I have tried setting the headers in the GET request for 'Content-Type' to 'image/jpeg'. That made no difference.
I have tried FILETOSTR and FRWITE with no luck, image is not able to be opened.
Alastair
I am struggling with downloading files.
That's ok for text & strings and so far a zip file - seems ok. But not for images.
I send a request to the server for a file by name, server responds with "I got file"
I then send a GET request to download the file. The file is returned as a data string in the response. I guess that is how it's done?
Can not the file be attached to the response as an object? Or does the contents of the file need to be sent in a different format server side?
I have tried setting the headers in the GET request for 'Content-Type' to 'image/jpeg'. That made no difference.
I have tried FILETOSTR and FRWITE with no luck, image is not able to be opened.
Alastair