Skip to content

downloadFile directory default value is incorrect #1717

Open
@jcesarmobile

Description

@jcesarmobile

Bug Report

Plugin(s)

filesystem

Capacitor Version

5

Platform(s)

all

Current Behavior

directory is documented as

  /**
   * The directory to write the file to.
   * If this option is used, filePath can be a relative path rather than absolute.
   * The default is the `DATA` directory.
   *
   * @since 5.1.0
   */
  directory?: Directory;

but on iOS the default is DOCUMENTS.
on Android the default is not one of the known directories, but Environment.DIRECTORY_DOWNLOADS.
on web the file is not saved into any directory of the Filesystem, but it downloads the actual file

Expected Behavior

The docs should be updated to document the actual behavior, or the code should be adjusted to match the documented behavior.

Code Reproduction

Other Technical Details

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions