UploadField::isSaveable()

Showing 1-2 of 2 messages
UploadField::isSaveable() Uncle Cheese 8/31/12 6:11 AM
When I use the "From Files" feature on an unsaved record, I get a "Forbidden" error. This is because UploadField::managesRelation() returns false, and that can be traced back to $this->form->getRecord() returning null.

Looking more carefully at the API, this should never happen because an UploadField shouldn't render when IsSavable is false.

But the isSaveable() function is curious. 

return (!$record || !$this->managesRelation() || $record->exists());

It's the first two conditions that really get me. Shouldn't it be the opposite?
Re: [silverstripe-dev] UploadField::isSaveable() Sigurd Magnusson 8/31/12 3:50 PM
Better still, save file to temp folder and link it/move it upon save. User friendly.

Sig

--
Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To view this discussion on the web visit https://groups.google.com/d/msg/silverstripe-dev/-/KSdGokmwTpIJ.
To post to this group, send email to silverst...@googlegroups.com.
To unsubscribe from this group, send email to silverstripe-d...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/silverstripe-dev?hl=en.