mirror of
https://github.com/zadam/trilium.git
synced 2024-11-15 12:17:01 +08:00
102 lines
2.8 KiB
HTML
102 lines
2.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>JSDoc: Source: entities/fattachment.js</title>
|
|
|
|
<script src="scripts/prettify/prettify.js"> </script>
|
|
<script src="scripts/prettify/lang-css.js"> </script>
|
|
<!--[if lt IE 9]>
|
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
<![endif]-->
|
|
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
|
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="main">
|
|
|
|
<h1 class="page-title">Source: entities/fattachment.js</h1>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<section>
|
|
<article>
|
|
<pre class="prettyprint source linenums"><code>/**
|
|
* Attachment is a file directly tied into a note without
|
|
* being a hidden child.
|
|
*/
|
|
class FAttachment {
|
|
constructor(froca, row) {
|
|
/** @type {Froca} */
|
|
this.froca = froca;
|
|
|
|
this.update(row);
|
|
}
|
|
|
|
update(row) {
|
|
/** @type {string} */
|
|
this.attachmentId = row.attachmentId;
|
|
/** @type {string} */
|
|
this.ownerId = row.ownerId;
|
|
/** @type {string} */
|
|
this.role = row.role;
|
|
/** @type {string} */
|
|
this.mime = row.mime;
|
|
/** @type {string} */
|
|
this.title = row.title;
|
|
/** @type {string} */
|
|
this.dateModified = row.dateModified;
|
|
/** @type {string} */
|
|
this.utcDateModified = row.utcDateModified;
|
|
/** @type {string} */
|
|
this.utcDateScheduledForErasureSince = row.utcDateScheduledForErasureSince;
|
|
|
|
/**
|
|
* optionally added to the entity
|
|
* @type {int}
|
|
*/
|
|
this.contentLength = row.contentLength;
|
|
|
|
this.froca.attachments[this.attachmentId] = this;
|
|
}
|
|
|
|
/** @returns {FNote} */
|
|
getNote() {
|
|
return this.froca.notes[this.ownerId];
|
|
}
|
|
|
|
/** @return {FBlob} */
|
|
async getBlob() {
|
|
return await this.froca.getBlob('attachments', this.attachmentId);
|
|
}
|
|
}
|
|
|
|
export default FAttachment;
|
|
</code></pre>
|
|
</article>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<nav>
|
|
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BasicWidget.html">BasicWidget</a></li><li><a href="FAttachment.html">FAttachment</a></li><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteContextAwareWidget.html">NoteContextAwareWidget</a></li><li><a href="RightPanelWidget.html">RightPanelWidget</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
|
</nav>
|
|
|
|
<br class="clear">
|
|
|
|
<footer>
|
|
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
|
</footer>
|
|
|
|
<script> prettyPrint(); </script>
|
|
<script src="scripts/linenumber.js"> </script>
|
|
</body>
|
|
</html>
|