MIME type of dso
by Chris Labombard · in Torque Game Engine · 10/28/2005 (11:18 am) · 3 replies
I am using the TCPObject Binary resource to download dso files from a web server to a client.
When I grab a dso file it's coming back with a MIME type of text/plain.
The downloaded file is empty. Is there a way to change the MIME type of dso files so I can grab them with application/force-download or something?
Has anyone tried ot download dso files with this method?
When I grab a dso file it's coming back with a MIME type of text/plain.
The downloaded file is empty. Is there a way to change the MIME type of dso files so I can grab them with application/force-download or something?
Has anyone tried ot download dso files with this method?
About the author
I have been a professional game programmer for over 5 years now. I've worked on virtually every platform, dozens of games and released a few of my own games, including 2 iPhone titles and a title waiting release on Big Fish Games.
#2
It shouldnt be empty though, it should have a header of around 4-9 lines, and then the file content.
I have downloaded DSO's just fine in TGE before.
10/28/2005 (11:26 am)
A DSO is as far as I know seen as a binary.It shouldnt be empty though, it should have a header of around 4-9 lines, and then the file content.
I have downloaded DSO's just fine in TGE before.
#3
I know the file is reaching me because I was echoing every line, compared it to the actual file contents, and it was the same.
The resource:
TCPOBject binary tracnsfer says to call
once you see the contenttype come up (I do that)
and then call
when it is done... which I do. . .
I'm echoing when the file is done... and it's echoing twice... Perhaps Im getting it but then overwriting it somehoe. Very strange.
10/28/2005 (11:28 am)
It comes out exactly as it's supposed to when I download it from the browser. I know the file is reaching me because I was echoing every line, compared it to the actual file contents, and it was the same.
The resource:
TCPOBject binary tracnsfer says to call
TCPObject.isBinary(true);
once you see the contenttype come up (I do that)
and then call
TCPObject.saveBufferToFile(%fileName);
when it is done... which I do. . .
I'm echoing when the file is done... and it's echoing twice... Perhaps Im getting it but then overwriting it somehoe. Very strange.
Torque Owner Martin Askestad
Martin's Games