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 creating a custom attribute file field type by following the documentation, the file should be correctly saved, and its reference should be stored in the database.
Actual Behaviour:
When attempting to save a custom attribute file field type, an error occurs. The issue seems to stem from the AttributeData class, specifically in the ->mutateDehydratedStateUsing method. There is an if condition that checks: if ($attribute->type == FileFieldType::class)
Since a custom attribute file field type is not strictly equal to FileFieldType::class, this condition does not execute.
Steps To Reproduce:
Follow the Lunar documentation to create a custom attribute field type for a file upload.
Attempt to save a record with this custom file field type.
Observe that an error occurs because the if condition does not account for custom file field types.
The text was updated successfully, but these errors were encountered:
Expected Behaviour:
When creating a custom attribute file field type by following the documentation, the file should be correctly saved, and its reference should be stored in the database.
Actual Behaviour:
When attempting to save a custom attribute file field type, an error occurs. The issue seems to stem from the AttributeData class, specifically in the ->mutateDehydratedStateUsing method. There is an if condition that checks:
if ($attribute->type == FileFieldType::class)
Since a custom attribute file field type is not strictly equal to FileFieldType::class, this condition does not execute.
Steps To Reproduce:
The text was updated successfully, but these errors were encountered: