File upload not working in iframe in HTML apps

1,376 views
Skip to first unread message

Durga Prasad

unread,
Mar 20, 2016, 1:14:51 PM3/20/16
to DroidScript
Hi,

I am embedding an webpage in my app with iframe. The webpage has file upload functionality, which works in browser, but not inside the droidscript HTML app. I have attached the sample spk with sample test link. Any help to identify this issue.

iframe.spk

Chris Hopkin

unread,
Mar 21, 2016, 5:27:59 AM3/21/16
to DroidScript
Hi Durga

What part of it doesn't work? The file picking or the uploading?

What version of Android are you using? Looks like there is a known bug in 4.4:

There is a FileUpload method coming in the next version of DroidScript, to make it easier to upload files to your server.

Thanks

Chris

Durga Prasad

unread,
Mar 21, 2016, 11:10:46 AM3/21/16
to DroidScript
Thanks Chris!

But my Android version is 5.0.2

And I tried in several other versions including 4.4.

I have the same issue.

It's works in normal browser. But not inside the app.

Is that any Android permission issue?

Regards,
Durga

Durga Prasad

unread,
Mar 21, 2016, 11:12:23 AM3/21/16
to DroidScript
The issue side is it doesn't trigger the file browser. When I click the browse button nothing happens. That's my issue

Chris Hopkin

unread,
Mar 21, 2016, 11:38:13 AM3/21/16
to DroidScript
Hi Durga


Thanks

Chris

Durga Prasad

unread,
Mar 21, 2016, 12:11:28 PM3/21/16
to DroidScript
Thanks Chris!

I know the same discussion happening again. But stack overflow solution majorly based on Java. I am looking for an way to Incorporate within droidscript technology without using actual Java code or prabably using JavaScript wrappers.

Chris Hopkin

unread,
Mar 21, 2016, 12:41:17 PM3/21/16
to DroidScript
The Java code on Stack Overflow is something we would have to use to update DroidScript to make file picking from a WebView work.

Do you need to do this using HTML? To pick a file right now, you will need to use DroidScript (e.g. Steve's File Picker or perhaps the Image Grid for images). Using the HTML file input element won't work unless we make the changes.

Thanks

Chris

Dave Smart

unread,
Mar 21, 2016, 1:00:09 PM3/21/16
to DroidScript
OK,

Guys, I'm going to try and stuff in that solution on stackoverflow right now.  If it is a quick solution and all goes well, then the next beta release of DS will include the file chooser.

Durga Prasad

unread,
Mar 21, 2016, 1:10:21 PM3/21/16
to DroidScript
Yes Chris,

I am looking for HTML based filepicker. At least it should enable the file browse functionality (<input type=file>). Since I am embedding a external website which has an upload button into my HTML app using iframe.


And thanks Dave for looking out this addition.

Reply all
Reply to author
Forward
0 new messages