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
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.