Skip to content

Releases: veliovgroup/Meteor-Files

v3.0.1

24 Sep 15:07
442a089

Choose a tag to compare

This is patch release fixing minor issues

v3.0.0

24 Sep 14:46
a00c648

Choose a tag to compare

Summary

  • ✨ Refactor: Hook options: protected, onBeforeRemove, onAfterRemove, onInitiateUpload, onAfterUpload, namingFunction are now async
  • 🤝 Refactor: Compatibility with meteor@3 and other modern packages
  • ☄️ Refactor: Match FilesCollection APIs with new *Async methods of Mongo.Collection; Deprecate callback APIs on the Server
  • 👨‍💻 Refactor: Utilize node's async APIs where suitable
  • 👨‍💻 Refactor: Improve pause/resume logic on connection interruption/reconnect
  • 📔 Docs: Updated and refactored docs with better examples
  • 📔 Docs: Refactored JSDoc matching definitions in TypeScript
  • 🤓 Dev: Improved TypeScript support
  • 👷‍♂️ Dev: Improved debugging logs
  • 👨‍🔬 Tests: Improved test-suite
  • 👷‍♂️ Git: CI GitHub Action Workflows for lint and build tests

Contributors

Special thanks to: @bratelefant @harryadel @jankapunkt @StorytellerCZ @make-github-pseudonymous-again an other contributors who helped to build and pushed v3 release forward

Major changes

FilesCollection:

  • ⚠️ FilesCollection#remove() — deprecated on server, use FilesCollection#removeAsync instead
  • ⚠️ FilesCollection#findOne() — deprecated on server, use FilesCollection#findOneAsync instead
  • ⚠️ FilesCollection#unlink() — deprecated on server, use FilesCollection#unlinkAsync instead
  • ⚠️ FilesCollection#write() — deprecated on server, use FilesCollection#writeAsync instead
  • ⚠️ FilesCollection#load() — deprecated on server, use FilesCollection#loadAsync instead

FileCursor:

  • ⚠️ FileCursor#remove() — deprecated on server, use FileCursor#removeAsync instead

FilesCursor:

  • ⚠️ FilesCursor#remove() — deprecated on server, use FilesCursor#removeAsync instead
  • ⚠️ FilesCursor#hasNext() - deprecated, use FilesCursor#hasNextAsync instead
  • ⚠️ FilesCursor#count() - deprecated, use FilesCursor#countDocuments instead
  • ⚠️ FilesCursor#countAsync() - deprecated, use FilesCursor#countDocuments instead

FileUpload:

  • ⚠️ FileUpload#start() is now async!
  • ✨ New FileUpload#remainingTime {ReactiveVar} with upload remaining time in human-readable format

Callbacks and hooks:

  • ⚠️ Anywhere: this.user() is deprecated, use this.userAsync() instead
  • ⚠️ Client: FileUpload now always triggers end even in the case of successful and failed uploads; Before: end event wasn't called under certain conditions
  • ⚠️ Client: All errors appeared during upload in all hooks and events of FileUpload are now instance of Meteor.Error; Before: Errors had mixed type or were simply text
  • ⚠️ Client: Errors are the same now (type, code, text, reason, details) within DDP and HTTP protocols; Before: DDP and HTTP protocols had different errors
  • ⚠️ Client: The next private events were removed from UploadInstance Class: upload, sendEOF, prepare, sendChunk, proceedChunk

New methods

FilesCollection:

  • ✨ Client: FilesCollection#insertAsync()
  • ✨ Anywhere: FilesCollection#updateAsync()
  • ✨ Anywhere: FilesCollection#removeAsync()
  • ✨ Anywhere: FilesCollection#findOneAsync()
  • ✨ Anywhere: FilesCollection#countDocuments()
  • ✨ Anywhere: FilesCollection#estimatedDocumentCount()
  • ✨ Server: FilesCollection#unlinkAsync()
  • ✨ Server: FilesCollection#writeAsync()
  • ✨ Server: FilesCollection#loadAsync()

FileUpload:

  • ✨ New FileUpload#remainingTime {ReactiveVar} with upload remaining time in human-readable format

FileCursor:

  • ✨ Anywhere: FileCursor#removeAsync()
  • ✨ Anywhere: FileCursor#fetchAsync()
  • ✨ Anywhere: FileCursor#withAsync()

FilesCursor:

  • ✨ Anywhere: FilesCursor#getAsync()
  • ✨ Anywhere: FilesCursor#hasNextAsync()
  • ✨ Anywhere: FilesCursor#nextAsync()
  • ✨ Anywhere: FilesCursor#hasPreviousAsync()
  • ✨ Anywhere: FilesCursor#previousAsync()
  • ✨ Anywhere: FilesCursor#removeAsync()
  • ✨ Anywhere: FilesCursor#fetchAsync()
  • ✨ Anywhere: FilesCursor#firstAsync()
  • ✨ Anywhere: FilesCursor#lastAsync()
  • ✨ Anywhere: FilesCursor#countDocuments()
  • ✨ Anywhere: FilesCursor#forEachAsync()
  • ✨ Anywhere: FilesCursor#eachAsync()
  • ✨ Anywhere: FilesCursor#mapAsync()
  • ✨ Anywhere: FilesCursor#currentAsync()
  • ✨ Anywhere: FilesCursor#observeAsync()
  • ✨ Anywhere: FilesCursor#observeChangesAsync()

New features

  • ✨ Client: FileUpload#remainingTime ReactiveVar — returns remaining upload time in hh:mm:ss format;

Other changes

  • 🐞 Bug: Fixed #885 — Upload empty file now end upload with error
  • 🐞 Bug: Fixed #901 — Caused by #894
  • 🔧 Security: Fixed #894 — now x_mtok cookie is set with secure and httpOnly flags
  • 🔧 Refactor: Fixed FileCursor#with implementation
  • ✨ Refactor: FileUpload#abort is now async
  • ✨ Server: FilesCollection#addFile is now async
  • ✨ Server: FilesCollection#download is now async
  • ✨ Server: WriteStream Class is now available for import
  • ⚙️ Client: disableUpload option processed on the client and returns error in the end/error events, and onError hooks. Before — throws an error upon calling .insert() method

Dependencies

release:

  • eventemitter3@5.0.1, was 4.0.7
  • removed: abort-controller, now using native AbortController
  • removed: fs-extra, now using native fs

dev:

  • added: chai@4.5.0
  • added: sinon@7.5.0

v2.3.3

28 Apr 13:19
49f3bed

Choose a tag to compare

Major changes:

  • no

Changes:

  • 👨‍🔧 Fixed #870, thanks to @Gobliins
  • 🤝 Compatibility with meteor@2.11.0

v2.3.2

03 Nov 14:47
4f58852

Choose a tag to compare

  • 👨‍💻 Potential fix for #857 (windows); Thanks to @Leekao

v2.3.1

03 Nov 12:43
df7a6c9

Choose a tag to compare

Changes:

  • 👨‍💻 Improve createIndex helper
  • 👨‍💻 Improve error output when FileSystem destination not writable; Related to #857, thanks to @Leekao
  • 🐞 Fix custom allowedOrigins option for CORS; Closing #850, thanks to @djlogan2;
  • 📔 Improve AWS S3 documentation, by @xsyann;

Notes:

  • 👨‍🔬 Tested with latest release of meteor@2.8.0

v2.3.0

17 Aug 11:17
00ab6f7

Choose a tag to compare

New features:

Other Changes:

  • 👷‍♂️ Minor codebase enhancements and cleanups

v2.2.1

29 Jun 20:16
313e842

Choose a tag to compare

  • 👨‍💻 Fix #842, a newly detected bug by @chrschae; Fixing case when namingFunction returns new nested path cause exception in .write() and .load() methods

v2.2.0

29 Jun 13:09
f5a335e

Choose a tag to compare

Breaking Changes

  • ⚠️ Changes in namingFunction, — now naming function acts the same on the Client and Server, upon insert, load, and write. Test your implementation with changed logic. Output of Server function supersedes Client's function output

Changes

  • 📔 Merge #843 and fix #820, thanks to @Prinzhorn
  • 📔 Documentation refactoring focused on examples and its simplifications
  • 👨‍💻 Support nested custom path returned from namingFunction
  • 👨‍💻 Fix namingFunction behavior on Client and Server in upload, load, and write methods, closing #842; Thanks to @chrschae
  • 👷‍♂️ Now library exports its helpers import { FilesCollection, helpers };
  • 👷‍♂️ Add .meteorignore to minimize package's footprint

v2.1.1

09 Jun 20:12
6573b59

Choose a tag to compare

  • 👷‍♂️ Fix index creation (ensure)

v2.1.0

09 Jun 12:33
7069257

Choose a tag to compare

Major changes:

  • ⚠️ FSName now sanitized and limited to 28 symbols, no white-spaces allowed
  • ⚠️ fileId now sanitized and limited to 20 symbols, no white-spaces allowed
  • ⚠️ File extension now sanitized and limited to 20 symbols, no white-spaces allowed
  • 📦 Decouple fs-extra, use native node.js fs module
  • 👨‍💻 Add missing isData helper via #795, by @harryadel

Changes:

Other:

  • 🤝 Compatibility with meteor@2.7.3