mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
333 B
333 B
Creating documents
Create by relative path:
$dms = DMS::getDMSInstance();
$doc = $dms->storeDocument('assets/myfile.pdf');
Create from an existing File
record:
$dms = DMS::getDMSInstance();
$file = File::get()->byID(99);
$doc = $dms->storeDocument($file);
Note: Both operations copy the existing file.