upload file from browser

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bohmgyorgy1990
Posts: 23
Joined: Wed Feb 19, 2014 2:33 am

upload file from browser

Post by bohmgyorgy1990 » Thu Mar 20, 2014 4:50 pm

Hy Mates!

I have an browser on my souliton ( mobileControlCreate "browser" ), i have a button in my web page ( <input type="file" placeholder="someonepath" class="form-control"> ).
I would like to do that if i click this button in my browser that get me back an android pop-up window where i can choose from camera, documents, galery and etc - like in the android's own chrome web browser (actually here work for me). What i should to do for this.

Kind Regards

George

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: upload file from browser

Post by FourthWorld » Thu Mar 20, 2014 5:00 pm

For security reasons most web sites don't provide a mechanism to accept uploaded files by default. However, you can write a CGI to accept data sent to it via POST - here's an example of how to do with this LiveCode Server:
http://forums.runrev.com/viewtopic.php?f=8&t=19144
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

bohmgyorgy1990
Posts: 23
Joined: Wed Feb 19, 2014 2:33 am

Re: upload file from browser

Post by bohmgyorgy1990 » Thu Mar 20, 2014 6:26 pm

So this means,that i cant upload image from my own mobile browser ( with any upload file button in my webpage )?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: upload file from browser

Post by FourthWorld » Thu Mar 20, 2014 8:22 pm

No, it means that you can of you have something on the server to receive the data.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

bohmgyorgy1990
Posts: 23
Joined: Wed Feb 19, 2014 2:33 am

Re: upload file from browser

Post by bohmgyorgy1990 » Sat Mar 22, 2014 6:46 pm

How can i handle a button in browser, this example work for me with LiveCode button but the browser button not respond. Can you explain me what i have to do, or can you show me an example.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: upload file from browser

Post by FourthWorld » Sat Mar 22, 2014 7:15 pm

Searching for the title of the thread in Google yields this among the many other results:

File input (or “upload”) in HTML forms
https://www.cs.tut.fi/~jkorpela/forms/file.html
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply