Skip to content

Commit 2ed7297

Browse files
authored
docs: Added upgrade notes to readme for v8 (#645)
1 parent 42b5e8f commit 2ed7297

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

README.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -411,20 +411,20 @@ writer.onprogress = function() { /*commands*/ };
411411

412412
## Upgrading Notes
413413

414+
### v1.0.0
415+
414416
In v1.0.0 of this plugin, the `FileEntry` and `DirectoryEntry` structures have changed,
415417
to be more in line with the published specification.
416418

417-
Previous (pre-1.0.0) versions of the plugin stored the device-absolute-file-location
419+
Previous versions of the plugin stored the device-absolute-file-location
418420
in the `fullPath` property of `Entry` objects. These paths would typically look like
419421

420422
/var/mobile/Applications/<application UUID>/Documents/path/to/file (iOS)
421423
/storage/emulated/0/path/to/file (Android)
422424

423425
These paths were also returned by the `toURL()` method of the `Entry` objects.
424426

425-
With v1.0.0, the `fullPath` attribute is the path to the file, _relative to the root of
426-
the HTML filesystem_. So, the above paths would now both be represented by a `FileEntry`
427-
object with a `fullPath` of
427+
Starting with v1.0.0, the `fullPath` attribute is the path to the file, _relative to the root of the HTML filesystem_. So, the above paths would now both be represented by a `FileEntry` object with a `fullPath` of
428428

429429
/path/to/file
430430

@@ -433,23 +433,24 @@ paths through the `fullPath` property of `Entry` objects, then you should update
433433
to use `entry.toURL()` instead.
434434

435435
For backwards compatibility, the `resolveLocalFileSystemURL()` method will accept a
436-
device-absolute-path, and will return an `Entry` object corresponding to it, as long as that
437-
file exists within either the `TEMPORARY` or `PERSISTENT` filesystems.
436+
device-absolute-path, and will return an `Entry` object corresponding to it, as long as that file exists within either the `TEMPORARY` or `PERSISTENT` filesystems.
438437

439438
This has particularly been an issue with the File-Transfer plugin, which previously used
440439
device-absolute-paths (and can still accept them). It has been updated to work correctly
441-
with FileSystem URLs, so replacing `entry.fullPath` with `entry.toURL()` should resolve any
442-
issues getting that plugin to work with files on the device.
440+
with FileSystem URLs, so replacing `entry.fullPath` with `entry.toURL()` should resolve any issues getting that plugin to work with files on the device.
441+
442+
### v1.1.0
443443

444-
In v1.1.0 the return value of `toURL()` was changed (see [CB-6394](https://issues.apache.org/jira/browse/CB-6394))
445-
to return an absolute 'file://' URL. wherever possible. To ensure a 'cdvfile:'-URL you can use `toInternalURL()` now.
446-
This method will now return filesystem URLs of the form
444+
Starting with v1.1.0, the return value of `toURL()` was changed (see [CB-6394](https://issues.apache.org/jira/browse/CB-6394))
445+
to return an absolute 'file://' URL. wherever possible. To ensure a 'cdvfile:'-URL you can use `toInternalURL()` now. This method will now return filesystem URLs of the form
447446

448447
cdvfile://localhost/persistent/path/to/file
449448

450449
which can be used to identify the file uniquely.
451450

452-
In v7.0.0 the return value of `toURL()` for Android was updated to return the absolute `file://` URL when app content is served from the `file://` scheme.
451+
### v7.0.0
452+
453+
Starting in v7.0.0 the return value of `toURL()` for Android was updated to return the absolute `file://` URL when app content is served from the `file://` scheme.
453454

454455
If app content is served from the `http(s)://` scheme, a `cdvfile` formatted URL will be returned instead. The `cdvfile` formatted URL is created from the internal method `toInternalURL()`.
455456

@@ -461,6 +462,13 @@ An example `toInternalURL()` return filesystem URL:
461462

462463
It is recommended to always use the `toURL()` to ensure that the correct URL is returned.
463464

465+
### v8.0.0
466+
467+
Starting in v8.0.0 the return value of `.toURL()` was changed for iOS to bring
468+
the behaviour more closely to Android. If the webview is hosted on `file://` scheme,
469+
then `.toURL` return will not change and will continue to return a `file://` URI.
470+
Otherwise it will return the app's scheme path.
471+
464472
## cdvfile protocol
465473

466474
- Not Supported on Android

0 commit comments

Comments
 (0)