Hi all,
I've some files stored in a SQL database. When a user visits a url with the given ID, the BLOB data is retrieved from the database to the webbrower via:
Byte[] myData = b.BlobContent;
Response.Clear();
Response.ContentType = "application/octet-stream";
Response.AddHeader("content-disposition", "attachment; filename=" + fileName);
Response.AddHeader("Content-Length", b.SizeInBytes.ToString());
Response.BinaryWrite(myData);
Response.End();
However, the iPhone (Safari) can't download a *.txt and *.doc file. It says: "Safari can't download this file". A pdf can(!) be downloaded and viewed.
On Android none of the files can be downloaded.
Is this because the iPhone and Android just can't handle all files? Or am I doing something wrong in the Response.
Many thanks in advance