Solved

Offline "file upload" so can switch image in a HTML page while offline (store images in localstore/HTML 5 etc)

Posted on 2010-11-09
6
360 Views
Last Modified: 2013-07-22
Hi Guys,

Working on a  HTML 5 web page for mobile devices (i.e. Android and iPhone) that simply displays an image that can be replaced with images stored on the local device by the user even when they're offline.

I want to avoid using phonegap etc as I don't want to have to distribute through various app stores (not looking to do this for money) so looking to do it all through "standard" web browser functionality (which means I need to use at least Android 2.2 so that I can get file upload button :) although there's still some question as to if that's working properly yet..)

Main problem keep encountering is one of browser security which prevents me from  referring to a local file location.

Was looking to bypass the security issue by "uploading" the file via a form but diverting it straight into the "localstore" and store previously uploaded images in an array for re use and so that it will work when the user is offline.

Has anyone tried this? Is it possible or are most of the mobile browsers still not there yet?

Thanks.

regards,

H
0
Comment
Question by:Amhazing
  • 2
  • 2
6 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 500 total points
ID: 34104146
0
 

Author Comment

by:Amhazing
ID: 34108366
Interesting idea..

I can't see how it solves the image upload problem though?  Am I missing something?  How would the image stored locally get into the canvas in the first place when the user is offline?

regards,

H

 
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 34108433
since you can render an image as a data url without sending it to the server it should be possible to store the url as a string in the local store until online and then send it to the server later
0
 

Author Comment

by:Amhazing
ID: 34108611
Thanks - will give it a try and update..

regards,

H
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question