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
When you call $model->save() multiple times on the same action/request it raises an exception with file upload failed.
I encounter this because I have a complex form which handles main model and submodels.
To save the submodules I need to generate the first model key so I initially save the model in a state where it's incomplete to get the primary key.
Then save the submodels, and then change the state of the master model to complete (this triggers an event to notify the user).
On the second save the FileBehaviour raises an exception 'cause it cannot find the temporary file which was handled on the first call.
The text was updated successfully, but these errors were encountered:
When you call $model->save() multiple times on the same action/request it raises an exception with file upload failed.
I encounter this because I have a complex form which handles main model and submodels.
To save the submodules I need to generate the first model key so I initially save the model in a state where it's incomplete to get the primary key.
Then save the submodels, and then change the state of the master model to complete (this triggers an event to notify the user).
On the second save the FileBehaviour raises an exception 'cause it cannot find the temporary file which was handled on the first call.
The text was updated successfully, but these errors were encountered: