Giter Site home page Giter Site logo

ionic-file-transfer's Introduction

Logo

A simple file transfer example in Ionic 3 using Ionic Native's

  • Transfer module to download a file to the local device
  • And then, using the File module, retrieve that file

Requirements

  • File Transfer will not work on an emulator; you'll need an iOS or Android device
  • If you're building/testing for/on iOS, you'll need XCode.

Build

Clone the repository and follow the steps based on the platform of your device.

iOS

  1. npm install
  2. cordova platform add ios
  3. ionic cordova build ios
  4. Connect your iOS device and run the application, either by
  5. Opening up the relevant .xcodeproj on Xcode and clicking the run button (making sure your device is selected)
  6. Running ionic cordova run ios --device on your CLI - this requires that the npm package ios-deploy is installed globally (npm install -g ios-deploy)

Android

  1. npm install
  2. cordova platform add android
  3. ionic cordova build android
  4. Connect your Android device and run the application with ionic cordova run android (make sure USB debugging is enabled on your device)

File Transfer - Storage Locations

The .jpg used in this example is saved in different locations dependant on platform:

  • iOS - in the app-specific Documents/ folder using cordova.file.documentsDirectory

  • Android - persistent and private data storage within the application's sandbox using cordova.file.dataDirectory

Here's the list of the different places you can store files using this plugin.

License

MIT

ionic-file-transfer's People

Contributors

dsgriffin avatar

Watchers

James Cloos avatar angela avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.