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
339 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
spacing 5 32
Urgent need help ASAP With CSS 5 25
Remove Protocol if at start of string? 3 15
Printing a Google Form 2 10
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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 …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now