Closed davidcollins4481 closed 6 years ago
When you upload the document in the CMS is the field value not as per the config? I'm confused as to why this isn't written if the current logic sets the correct value of the CMS field
When you upload the document in the CMS is the field value not as per the config?
Correct. When adding a document in the "Documents" tab on a page, the value that always gets set by default is the default value of the enum
"DownloadBehavior" => 'Enum(array("open","download"), "download")',
The check of the config option only occurs when viewing the document after upload. I tested this on 2.2.0 and 1.x.
The check of the config option only occurs when viewing the document after upload. I tested this on 2.2.0 and 1.x.
Ahah! I see.
I needed to change the default to be "open" rather than "download". I set this
but noticed that when uploading new documents the default state from the enum of the field was written rather than the default option set in my config. I added code in onBeforeWrite to write the default if set.