externa media source integration
brescianicri opened this issue · 2 comments
I try to access to drop box media source but doesn't work. You ca write e documentation ?
This is my snippest:
[[!FileDownload?
&getDir=`tests/`
&mediaSourceId=`6`
&tplFile=`jsDownload`
&tplWrapper=`jsDownloadwp`
&dateFormat=`d-m-Y`
&sortBy=`date`
&sortOrder=`DESC`
]]
But i recive this error:
"Principal 3 does not have permission to load object of class modContext with primary key: mgr"
and i don't see anything.
In my opinion this parameter "getDir" doesn't need, because in my dropbox app i select the directory.
Maybe i found the problem:
in _fileInformation function this instruction:
$type = @filetype($fileRealPath);
(row 1244)
doesn't work, and return false.
This do fail the order function and return nothig.
I add at line 1117 this if:
/*check that there is the file type or else I put in file*/
if ($fileInfo['type'] === false) {
$fileInfo['type'] = 'file';
}
and work, a see you script don't take, the correct date of file and 0 with file size.
I use this puglin:
http://modx.com/extras/package/dropbox
for create the media source.