-
For my screen: The files upload as attachments and 'myphotos' gets set as ["11","12","13"] however when I return to the edit screen, the "Upload file" field is blank and not showing my uploaded files.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Try to add ->targetId() at the end... |
Beta Was this translation helpful? Give feedback.
-
The issue with the previously uploaded attachments failing to load seems related to this: /vendor/orchid/platform/src/Screen/Fields/Upload.php line 116:
From the database value, $value is being set to this after Arr::wrap():
This then always fails assertion If instead I set What am I missing here? Does the MySQL field attribute need to be of a specific type? Edit to note that I already tried JSON/text/varchar types with MySQL 8 and it results in the same failed assertion. |
Beta Was this translation helpful? Give feedback.
The issue with the previously uploaded attachments failing to load seems related to this:
/vendor/orchid/platform/src/Screen/Fields/Upload.php line 116:
From the database value, $value is being set to this after Arr::wrap():
This then always fails assertion
if (! Assert::isIntArray($value))
If instead I set
$value = array(78,79,80);
then all the image attachments load as expected!What am I missing here? Does the MySQL field attribute need to be of a spec…