Phonegap: Uploading an image to server using backbone - javascript

I am building a Phonegap Application and for client side MVC I am using Backbone. My App is using camera for clicking images then it uploads that images to the server.
However Phonegap provides us an option to upload images to server using FileTransfer() but since I am already using Backbone thats why I needs something integrated with Backbone. So that I can easily upload it just using the save method and utilize the already build Backbone.sync feature.

Related

Need to send file data from angular 7 application to Javascript Application

I am trying to create the Preview of the selected file as Flipbook.
I am having angular 7 application where I am uploading image and I have to create flipbook view for the selected file for that I found one Javascript Flipbook project.
But not understanding the in tegration of both project as I am not knowing Javascript too much.
I thought to create one post call from angular 7 project consist of file data as request parameter and access that url through Javascript project using XMLHttpRequest.
but not sure about implementation.
Can anyone help me to get integration of both project?

using JQuery fileTree for Apache Cordova application

I am trying to use this File Tree For my Apache Cordova Application.
As it cannot contain any server side scripts, the script must be placed into a seperate project and be called from the client side (apache cordova app).
So that means I need to call the script with Ajax jquery and display the files.
How do I do it using this JqueryFile browser JQuery fileTree?
I can suggest 2 approaches.
1) Use Cordova File api to get a list of directories/files to render a file tree in your JS application(i.e. Populate jQuery file tree)
http://docs.phonegap.com/en/edge/cordova_file_file.md.html#DirectoryReader
2) I have not used this plugin myself, but you can use a Cordova plugin like below to access the native file system:
Cordova Plugin File
You can not run a JavaScript library on the native side, you'd need to write code in ObjectiveC/Swift for iOS or Java for Android and create a plugin like above.

Upload files using angularjs without php script

just want to ask if it is possible to upload files (images, docs, pdf, etc.) using angularjs without actually using php script, instead all file uploads will use angularjs or javascript codes?. With this method i will be able to lessen the server load. Thanks
That is not possible.
AngularJS is solely a frontend framework. In order to upload something, you need to communicate with a server.

Offline image upload for Meteor.js app

There is a Meteor.js app, which is suppose to stay fully functional in offline mode. This app enables users to upload their images and use those images to create content within the app.
Question - how to approach image upload in the Meteor.js app, so that the app stays fully functional in offline mode?
My thoughts so far:
--There is Meteor Offline Data project, but it is still very much work in progress, and it only works for text content: https://github.com/awwx/meteor-offline-data
--In offline, when adding the image in the app, I could detect offline mode and utilize HTML5 File API for using the image locally
--When online is detected, the image is uploaded to the server behind the scenes
--In online content with images is downloaded to the app and saved for offline usage using App Cache
There are still many things unclear, so any hints are appreciated at this point.
You may want to try collectionFS, https://atmosphere.meteor.com/package/collectionFS, as it make a client side collection that the file is added to. The clientside collection should sink when the internet reconnects.

How to deploy WaveMaker project without runtimeLoader.js

WaveMaker is a powerful ajax based UI builder, but its JSON-RPC API standard is incompatible with our web service, which only has a RESTful API. As a result, we would like to design an UI without using any service using WaveMaker, and only extract part of its source code that runs on browser side (discarding all services)
Unfortunately, we can neither view or test the extracted code (all .html files show an empty page), a javascript reference in index.html is pointing to runtimeLoader.js, which we cannot find anywhere. So, is it possible to deploy the browser side code on a web container (not an application container like Tomcat) without runtimeLoader.js? If this is not possible, how do I change the source code so it can be tested without using WaveMaker?
If you don't mind having a java server in the mix, you could "import" REST calls to your API into the application. The XHR service (new in 6.5) targets JSON returning services. The 'Build-a-Service' does best with XML returning services. The browser would then call the WM java server, which in turn calls your REST services.
An easy way to get started with a WaveMaker client only app is to use the phonegap build option. This will build a zip file of a stand alone app. If you unzip that into say an apache served folder, you will render pages, etc. Note this build is targeted towards mobile devices via phonegap, so you will want to make adjustments if you are targeting desktop browsers.
Also, runtimeLoader.js can be found in the client runtime lib folder. e.g. /studio/lib/runtimeLoader.js of the installation.

Categories

Resources