Skip to content

Comments 0.4.9: Re-uploaded files come back from the trash

Comments 0.4.9 fixes attachments that stayed in the trash: a file someone had trashed and then attached to a comment again is now restored and placed with the comment.

Storage recognises an upload it already holds and reuses the stored file. When that file was in the trash, the comment pointed at a trashed file. Now it is restored into the comment’s folder, or to the media root when there is no folder or the folder is gone. A database error while restoring is logged and the comment is still posted.

Attachment folders are now placed through core’s shared storage rules, so a folder trashed after the host chose it is refused and the file stays at the media root. Activity is logged through core’s PhoenixKit.Activity.log/3.

Upgrading

Comments 0.4.9 needs phoenix_kit 2.38.0 or later (and below 3.0). Update the dependency.

Full release notes: Comments 0.4.9

0.4.9 · 26 September 2026

Changed

  • Requires phoenix_kit >= 2.38.0 and < 3.0.0 (was ~> 2.0): the module now uses core’s shared toolkits, which first shipped in 2.38.0, and that release also carries the attribution columns.
  • Comment attachments are placed through core’s Storage.ResourceFolders (hook calling, uuid checking and the attach rule), so a folder that was trashed after the host answered is refused and the file stays at the media root.
  • The acting user comes from PhoenixKitWeb.Actor.opts/1 and activity is logged through PhoenixKit.Activity.log/3.

Fixed

  • A file the uploader had trashed and then uploaded again to a comment (storage dedupes it back to the trashed row) is restored instead of staying trashed. It goes into the comment’s folder, or to the media root when there is no folder or the folder is gone.
  • Restoring that file at the media root can no longer crash the upload on a database error; the failure is logged and the comment is still posted.

Comments 0.4.9. Install or update: {:phoenix_kit_comments, "~> 0.4"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.