unclecheese/silverstripe-dropzone

validate and getValidFileIDs

Closed this issue · 3 comments

The validate method checks for validIDs which is a good thing, but relies on something set in the session. So, if you have a form with let's say Pictures, they are not going to be valid next time you visit the same form (at least, on my setup).

This is why I had to do something like that

$uploader->addValidFileIDs($this->dataobject->Pictures()->column('ID'));

To make it work, instead on relying on loadDataFrom to setValue and make sure the loaded files are valid.

Is this the expected use? having to call addValidFileIDs manually seems more work that it needs to.

Fixed in #78

@lekoala If this looks fixed on your end. Mind closing this?

yes, perfect