Wednesday, October 17, 2012

Mobile browser limitation and fix suggestion

A limitation that I ran into when working on fivetonow.com was adding pictures to an event posting using a mobile browser. I have an iPhone and found it very disappointing that I cannot upload a photo into a mobile website. For this I would need an app. Here is my proposal how to solve this problem; all I need is to get the mobile browser manufacturers to hear me out.

Part 1: “Share bookmarks”

A site can include a special link that allows mobile devices to know how to share various assets such as picutres with that site. So in the fivetonow.com example we want to create a special link to create a new event, with picture. The link would look something like:

<a href="/CreateEvent" data-sharesender="image" data-shareid="eventpic">Add a ‘Share to fivetonow’ bookmark to your mobile phone</a>

The key part of this link is the data-sharesender attribute. This attribute would signal the mobile device that the user wants to register this site as a valid destination for their photo sharing. The same way I can share an image with the facebook or twitter app on my phone today, this link would cause my phone to register the /CreateEvent path of the given site as a valid place to send photos.

Part 2 “Receiver locations”

Once my phone understands that there is a special url I want to share photos with, that url needs to handle these photos. This means we need a standard way of processing an image being uploaded to such a special url. This is actually quite easy as long as we can agree on a standard. :)
The page can contain an input element like so

<input type="file" name="whatever" data-sharereceiver="image" data-shareid="eventpic ">

Now the mobile browser would know that it needs to add the file path to the input field when it opens that page. It uses the data-shareid attribute to find the correct input field and writes the file path into it. This way the access to the filesystem on the mobile device is still limited but the user is able to submit pictures to websites. A regular browser works as intended since it just ignores the data- attributes.

This can be extended with different types of share bookmarks like sound and video. It would be easy to use, flexible and still safe as the phone decides what files can and cannot be shared.

Now if only I can get Apple to listen to me…..

No comments: