Mobile Web App Photo Uploads - javascript

Here is our situation:
We have a Web App built on .NET framework using HTML5 and javascript to handle client side data processing. There is also a back end of a Web SQL database (yes-deprecated, in the process to transitioning to WebStorage and this is part of that process) that holds all of the form data so that data is accessible offline. There is a sync button that will upload all of the data to our server (via web method and data adapters). I can provide more details if necessary but that is the gist of the situation.
I want to know the best way to handle photo uploads. We use HTML5
<input type='file'>
and
<input type='file' multiple='multiple'>
to access the file system (photos) and "store" them.
My idea is to store the file location in the database, and then execute the uploads when Sync is pressed, but i'm not sure that is possible on iOS and/or Android. If this solution is possible, can someone point me in the right direction? If not then i'd like to hear ideas on the best way to achieve this without storing the entire photo file in the Web SQL database.

Related

What is the best way to develop a offline first application in React Native?

Offline applications is a feature that permits the user to access mobile apps without the Internet.
On my requirement, I would like to create an app that allows users to save data such as pictures and videos while they are offline and upload them when they connect to the internet.
What is the best way to achieve my goal, and what are my data storage options?
its a good statement,
You can start of by integrating https://github.com/andpor/react-native-sqlite-storage .Its a good offline storage mechanism,
2nd: Im guessing youve already integrated an image picker, so basically now on imagePicker response of selecting an image succesfully, you need to save that URI in sql lite database whenever the user is OFFLINE. WHEn user is ONLINE dont add in SQL lite, instead directly upload those Image URI's to backend
3rd. Now also keep track of all the number of rows in database, whenerv user comes back ONLINE, you can start uploading every row (which contains URI) one by one, and once its done, delete each row in SQL lite
Hope it helps, feel free for doubts

Connecting local HTML files to Sharepoint database

I am new to using this stuff. I need to make some sort of a connection from a local html file on my computer to either Sharepoint or an Access database. I want to be able to pull data from the Sharepoint/Access db and display it on my html page. I also would like to use javascript to accept user input and in turn query those databases with that.
I currently have built some simple vba that outputs an HTML file with table data and another HTML file which houses that table with an iframe on the page. This is very limited and does not provide full functionality. Can anyone lead me in the right direction? Is this even possible without those pages being hosted on a server somewhere? I understand I may need to use PHP, but I do not believe I can use that functionality without having these files on a server.
Forgive me if I do not sound like I know what I'm talking about...I don't really :)
Thanks!

Making a database application with just JavaScript?

I need to make a dead simple web application. Users hit a static HTML page and enter some basic info (name, and comment). When they hit submit, I want to store this info in either a CSV file or a sqlite on the hosting server. I know all of this is possible with django/python or ror/ruby but is there anyway to do this with just JavaScript?
Thanks in advance..
There's few ways to handle this, using just javascript. Which is to use a hosted Backend-as-a-Service.
You would need to make API calls on the client end, and will be able to connect to it without having to rely on a backend technology.
Most of these technologies are built for mobile, but you can still use it to build it on your static HTML pages. (cross browser issues may vary).
Here are some:
Firebase (https://www.firebase.com/docs/web-quickstart.html)
Parse (https://parse.com/docs/js_guide)
There's more out there if you google Backend as a service.
If you are looking for something more simple, just need to take information and store it (like a form), then I would suggest looking at these services:
Wufoo (http://www.wufoo.com/)
jotform (http://www.jotform.com/)
Hope it helps!

How can I write data to and update HTML5 cached web pages while working offline?

In the application I am writing, a user captures information about a person via an online form. When they have completed the form they save their work, repeating this process several times in a session. When they hit 'Save and End Session' they are returned a list of the several person instances they have just saved, all data being saved to a server.
I wish to replicate this functionality in an offline app. Using HTML5 I understand how to cache pages, and how store the JSON form data in localStorage using raw Javascript (or perhaps Angular.js cache).
But is it possible to dynamically update cached webpages with cached data while offline? how, for example, can I write the the cached form data to a cached copy of the list page, updating that page with the data just produced, all during the offline session?
I cannot find an answer to this one. All suggestions are much appreciated!
If I understood this correctly, you want to dynamically update the html view while offline.
If you are using Angular, this is pretty simple.
You just have to cache also the JS controller, not only the html file (set it in the cache.manifest). The page will have the same functionality as the online app then. But if you want to send the stored offline data back to the server when offline, you can write a simple code that will:
Save the parameter in localStorage, which will mark if the data was saved while running online/offline app (you can recognize onine/offline by sending AJAX request to an existing part of the app, which is not available offline (so not cached one))
When app runs then in online mode, it will collect all the data stored offline and send it to the server

fetch clipboard data

i need to fetch a Prt Screen Image from the clipboard and save it in the database.
I have never really done the save image in database thing before.
The clipboard lives on the client operating system; unless the user pastes the image into an editor, saves it and uploads it using a form, there's no way you can get that data with HTML and the server side alone.
You can't grab a printscreen of a client by with PHP. PHP is a server side technology and cannot access the client. You'd have to use some kind of client side tech like flash, js or java applet. You might want to retag your question if those are permissible.

Categories