forked from aaronmars/martian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pageFile.js
20 lines (18 loc) · 844 Bytes
/
pageFile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { Plug } from '/mindtouch-http.js/plug.js';
import { PageFileBase } from './pageFileBase.js';
import { Settings } from './lib/settings.js';
/**
* A class for managing a file attachment on an published page.
*/
export class PageFile extends PageFileBase {
/**
* Construct a new PageFile.
* @param {Number|String} [pageId='home'] - The ID of the published page.
* @param {String} filename - The filename of the file to manage.
* @param {Settings} [settings] - The {@link Settings} information to use in construction. If not supplied, the default settings are used.
*/
constructor(pageId, filename, settings = new Settings()) {
super(pageId, filename);
this._plug = new Plug(settings.host, settings.plugConfig).at('@api', 'deki', 'pages', this._pageId, 'files', this._filename);
}
}