HELP! on downloading "content not supported on this phone."

DroidPilot

New Member
Joined
Nov 23, 2009
Messages
15
Reaction score
0
Location
Grand Rapids, MI
I have the Moto Droid. I am having issue viewing a webpage/document on my droid. My company has a web based document retrieval portal that I use to use quite often on my windows mobile. It is a secure website and I can navigate and login to the site no problem but when I input my data that generates the document I need is when the droid fails.

The document is served up as a ".web" page/doc. My droid returns a "<Unknown> Cannot download. The content is not supported on this phone." When I use my mac book it downloads and I can open it w/ MS Word or as a straight text file. My Windows Mobile w/ Opera was able to open these files no problem but the droid fails.

I've downloaded "Documents to Go", "G-Docs", "Offiviewer", "Office Suite"
and none of them help.

I hope there are some super droids out there that can help!
 

richteel

New Member
Joined
May 18, 2010
Messages
6
Reaction score
0
Location
Northern Virginia
I have a web page which streams files to the client. The ContentType is set to application/octet-stream which I suspect may be the problem. Does anyone know if this could be the issue?

Rich
 

virtuox

New Member
Joined
Dec 16, 2009
Messages
11
Reaction score
0
I have a web page which streams files to the client. The ContentType is set to application/octet-stream which I suspect may be the problem. Does anyone know if this could be the issue?

Rich
I actually found it to be that certain file types arent recognized by the filesystem and don't allow the download of certain files. I couldnt download . zip files directly until I installed Astro file manager since it seems to add support for .zip files. Once installed it solves that file download issue at least for that file type.
 

richteel

New Member
Joined
May 18, 2010
Messages
6
Reaction score
0
Location
Northern Virginia
virtuox,

I have Astro installed and attempted to download a plain text file (*.txt) but that failed as well, which led me to suspect that it is the method that the web site is using to send the file to the client.

In my case, I am using the reponse object to stream the file to the client.
C# Code
Code:
private void sendFile(string fileName, string saveAs)
{
    byte[] fileStream;
    if (fileName.Length == 0)
        return;
    fileStream = File.ReadAllBytes(UploadFolder + fileName);
    saveAs = Regex.Replace(saveAs, @"[?:\/*""<>|]", "_");
    //One final check
    if (!IsFileNameValid(saveAs))
        saveAs = "Default.txt";
  Response.AddHeader("Content-Description", "File Transfer");
  Response.AddHeader("Content-Type", "application/octet-stream");
  Response.AddHeader("Content-Disposition", "attachment; filename=" + saveAs);
  Response.AddHeader("Content-Transfer-Encoding", "binary");
  Response.AddHeader("Expires", "0");
  Response.AddHeader("Cache-Control", "must-revalidate, post-check=0, pre-check=0");
  Response.AddHeader("Pragma", "public");
  Response.AddHeader("Content-Length", fileStream.Length.ToString());
    Response.OutputStream.Write(fileStream, 0, fileStream.Length);
    WriteToLog("File Downloaded", fileName);
 
  Response.Flush();
    Response.End();
}
 
Top