Feature: Allow error reason to get to the server#3150
Feature: Allow error reason to get to the server#3150Gigitsu wants to merge 1 commit intophoenixframework:mainfrom
Conversation
|
Related: #2502 |
|
Note my hesitancy here is a few things - the value cannot be trusted from the client, the value is held in memory, and there is no way to "reactively" handle the error, ie it is only really useful in the template. To really handle it you need to go through one of the LiveView callbacks, in which case you need to message the LV out of band. I do think passing as a tuple is reasonable, as it indicates it comes from the client. We could also guard on bytesize, but we'd mixing trusted values vs untrsusted values, so I am not sure. In practice you'll also need to handle this yourself by pushing a message anyway. In your usecase, are you simply wanting to show the error message you got from S3 on the UI somewhere? Or are you doing more with the error value? |
This PR aims to allow external upload error reason to get to the server. This will enable the server to render error messages in a live view, providing a more seamless and informative user experience.
See this post for more details.
Please be aware that this PR introduces a breaking change. However, I think it is necessary to ensure that the argument passed to the UploadEntity error function remains useful in the context of external uploads.