Display.getInstance().execute(url) treats every file as pdf

27 views
Skip to first unread message

David Wafula

unread,
Sep 14, 2017, 10:54:55 AM9/14/17
to CodenameOne Discussions
Hi,

I have WebComponent rendering local html file which contains links to downloadable files that are .doc. I  was expecting Display.getInstance().execute(url) to atleast download the file, instead it tries to open the file as pdf and fails  obviously  (with message saying pdf is invalid format).
How to force file download from WebComponent?

--
David W

Steve Hannah

unread,
Sep 14, 2017, 12:24:08 PM9/14/17
to codenameone...@googlegroups.com
What platform are you experiencing this on?  Android, iOS, Simulator, etc..

Steve

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/CAK9Ws2fx-xAK7HrQnV%3Dm-bDsnV_iU2Rgj4NnBQkNicD6wjTQuA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
Steve Hannah
Software Developer
Codename One

David Wafula

unread,
Sep 14, 2017, 1:20:30 PM9/14/17
to CodenameOne Discussions
This is on android 5.1. On a real device. 

On 14 Sep 2017 18:24, "Steve Hannah" <steve....@codenameone.com> wrote:
What platform are you experiencing this on?  Android, iOS, Simulator, etc..

Steve
On Thu, Sep 14, 2017 at 7:54 AM, David Wafula <davi...@gmail.com> wrote:
Hi,

I have WebComponent rendering local html file which contains links to downloadable files that are .doc. I  was expecting Display.getInstance().execute(url) to atleast download the file, instead it tries to open the file as pdf and fails  obviously  (with message saying pdf is invalid format).
How to force file download from WebComponent?

--
David W

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsubscr...@googlegroups.com.



--
Steve Hannah
Software Developer
Codename One

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.

Shai Almog

unread,
Sep 15, 2017, 12:26:56 AM9/15/17
to CodenameOne Discussions
Reply all
Reply to author
Forward
0 new messages