Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
394 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 2000 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 does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

These days software publishers make it possible to move all the possible applications on smartphones, tablets, smartwatches, and more. Although behind every logic and decision is a gross doubt: how do they make it possible? In this blog post, we sha…
Creating a Cordova application which allow user to save to/load from his Dropbox account the application database.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
This video is in connection to the article "The case of a missing mobile phone (https://www.experts-exchange.com/articles/28474/The-Case-of-a-Missing-Mobile-Phone.html)". It will help one to understand clearly the steps to track a lost android phone.
Suggested Courses

972 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