You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/backpex/fields/upload.ex
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -119,13 +119,15 @@ defmodule Backpex.Fields.Upload do
119
119
],
120
120
remove_uploads: [
121
121
doc: """
122
-
A function that is being called after saving an item to be able to delete removed files.
122
+
A function that is being called after editing an item to be able to delete removed files.
123
+
124
+
Note that this function is not invoked when an item is deleted. Therefore, you must implement file deletion logic in the `c:Backpex.LiveResource.on_item_deleted/2` callback.
123
125
124
126
**Parameters**
125
127
126
128
* `:socket` - The socket.
127
129
* `:item` (struct) - The item without its changes.
128
-
* `removed_entries` (list) - A list of removed uploads during edit.
130
+
* `removed_entries` (list) - A list of removed uploads during edit. The list only contains files that existed before the edit.
0 commit comments