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
this seems to work for me. The reason I think is that setDefaultFolder() already uses Folder::findOrMake() so a folder object was being passed as input here instead of a string.
The problem seems to be caused by the BrowseLink() function.However to make it still work as intended, since $this->defaultFolder is actually a Folder Object and findOrMake needs string, the function needs to be written like this:
public function BrowseLink() {
$folder = $this->defaultFolder
// findOrMake requires a string for a path that is relative to the assets folder
? Folder::findOrMake(str_replace("assets/", "", $this->defaultFolder->Filename))
: singleton('Folder');
return Director::absoluteBaseURL() . "admin/files/select/{$folder->ID}";
}
$file->setDefaultFolder('test');
this will create 'test', and store my files in test, but it also creates a folder named 'folder'.
The text was updated successfully, but these errors were encountered: