Skip to content

0.17.1

Latest

Choose a tag to compare

@vinceglb vinceglb released this 17 Nov 13:56
fb02b46

FileKit 0.17.1 is a patch release with bug fixes, a small web addition and a docs refresh.

Web apps can now turn a browser Blob or File into a PlatformFile. This release also fixes the file saver title on Windows and MIME type parameter parsing, and makes opening files with the default application more reliable on Linux desktops.

✨ What's New

  • Add PlatformFile(blob, name) on JS and Wasm to create a PlatformFile from a browser Blob or File, for example from drag and drop or fetch. It keeps the MIME type, and a File keeps its lastModified (closes #173). By @leitingzi in #703 (docs)

✅ Improvements

  • JVM FileKit.openFileWithDefaultApplication now checks that java.awt.Desktop can open files, falls back to xdg-open on Linux, and throws FileKitDialogException when neither works, by @vinceglb in #700
  • Remove FileKitFileSaverWithoutBytesException on web: it was public but never thrown, by @vinceglb in #700
  • The sample apps use the FileKit brand, and the live web demo is deployed again, by @vinceglb in #698 and #694

🐛 Bug Fixes

  • Apply FileKitDialogSettings.title to the file saver on JVM Windows, which always showed the default "Save As" title (fixes #707) by @vinceglb in #715
  • Fix MimeType.parse replacing every parameter value with its name (text/plain; charset=UTF-8 gave charset=charset). This also fixes MimeType.toString(), equality between MIME types that differ by a parameter value, and the MIME type used when copying into an Android bookmarked directory, by @vinceglb in #716

📝 Documentation

⬆️ Dependency Updates

  • Gradle 9.8.2 → 9.9.1
  • Android Gradle Plugin 9.4.1 → 9.5.1
  • kotlinx-serialization 1.12.0 → 1.13.0
  • kotlinx-io 0.9.1 → 0.9.3
  • Robolectric 4.17 → 4.18 (tests only)

⚠️ Migration Notes

  • Removed FileKitFileSaverWithoutBytesException (web). It was never thrown, so only code that references the class by name is affected: delete those references.
  • JVM openFileWithDefaultApplication can now throw FileKitDialogException when the desktop can't open files, where it used to throw HeadlessException or UnsupportedOperationException. On Linux, it tries xdg-open first.
  • MimeType parameters now hold their real values, trimmed and lowercased (charset=utf-8). Code that worked around the old charset=charset output can drop that workaround.

🙏 Contributors

Thanks a lot to @leitingzi for bringing Blob support to the web, and welcome to FileKit ❤️

Thanks also to @bfovez for the detailed Windows report in #707, to @ApoloApps for proposing Blob support in #173, and to @bartwell and @yannickpulver for the report and the solution in #158.

New Contributors

Full Changelog: 0.17.0...0.17.1