weexpack plugin add nat-transfer
npm install natjs --save
Use in weex project (.vue
/.we
)
<script>
import Nat from 'natjs'
Nat.download({
url: 'http://domain.com/file'
})
Nat.upload({
url: 'http://domain.com/upload',
path: 'filepath'
})
</script>
See the Nat Documentation for more details.