user3118860 user3118860 - 1 month ago 15
Android Question

Cordova doesn't show image in android

I try to develop a cordova project for cross-platforms. I have to upload photos to a server from gallery or with camera. And also i should show their thumbnails or small previews.

Gallery and camera option works in browser but in android when i try to select and image and upload. It uploads but doesn't show little image.

Thanks.

It's my html

And my javascript code

Answer

The FileTransfer object provides a way to upload files using an HTTP multi-part POST or PUT request, and to download files.To install this plugin simply run Command

cordova plugin add cordova-plugin-file-transfer

Properties

onprogress: Called with a ProgressEvent whenever a new chunk of data is transferred. (Function)

Methods

upload: Sends a file to a server.

download: Downloads a file from server.

abort: Aborts an in-progress transfer.

Read about the FileTransfer you will get their example code of upload file and download file.

Comments