Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 230392

How to use Filesystem.downloadFile()? How to set URL?

$
0
0

@julio-ionic Awesome, thanks for your info! Created an issue about it.

Just testing it out. This works:

    import { CapacitorHttp } from '@capacitor/core';
    let url = 'http://192.168.178.25:3000/'
    const response = await CapacitorHttp.request({method: 'GET', url })
    console.log('response', response)

But this does not, it just stops, no “dl” output:

    import { Filesystem } from '@capacitor/filesystem'

    let url = 'http://192.168.178.25:3000/'
    console.log('url', url)

    const dl = await FileSystem.downloadFile({
        method: 'GET',
        url,
        directory: Directory.Data,
        path: '123.txt'
    })
    console.log('dl', dl)

Viewing all articles
Browse latest Browse all 230392

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>