Skip to content
Permalink
Browse files
Updated documentation
  • Loading branch information
hortonr6 committed Nov 25, 2019
1 parent 8b96f2a commit 71b429b8cfc46d7ea64400f55bd95100733ab68f
Show file tree
Hide file tree
Showing 17 changed files with 25 additions and 27 deletions.
@@ -802,7 +802,7 @@
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 01:32:16 GMT+0000 (Greenwich Mean Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 17:25:00 GMT+0000 (Greenwich Mean Time)
</footer>

<script> prettyPrint(); </script>
@@ -56,7 +56,7 @@
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 01:32:16 GMT+0000 (Greenwich Mean Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 17:25:00 GMT+0000 (Greenwich Mean Time)
</footer>

<script> prettyPrint(); </script>
@@ -61,7 +61,7 @@ const defaultPort = 8080
const port = process.env.PORT || defaultPort
const dbName = 'website.db'
const domainName = 'http://localhost:8080'
const expiryCheckInterval = 300000 // Three minutes
const expiryCheckInterval = 200000 // Two Minutes

/**
* The secure home page.
@@ -181,7 +181,7 @@ router.post('/upload', koaBody, async ctx => {
const uploadResult = await upload.uploadFile(path, name, ctx.session.username, targetUser) // Throws error if not successful
ctx.redirect(`/shareFile?h=${uploadResult}`) // Successful upload
} catch (err) {
await ctx.render('error', { message: err.message })
await ctx.redirect('/upload', { message: err.message })
}
})

@@ -244,7 +244,7 @@ router.get('/file', async ctx => {
ctx.body = fs.createReadStream(filePath)
ctx.set('Content-disposition', `attachment; filename=${fileName}`) // Lets the user download the file
const remover = await new Remove(dbName)
const timer = 500000 // Sets timer amount
const timer = 60000 // Sets timer amount (1 Minute)
setTimeout(() => {
remover.removeFile(sourceUser, hash)
}, timer) // Delete the file after approx. 5 minutes to allow user time to download it
@@ -285,7 +285,7 @@ module.exports = app.listen(port, async() => console.log(`listening on port ${po
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 01:32:16 GMT+0000 (Greenwich Mean Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 17:25:00 GMT+0000 (Greenwich Mean Time)
</footer>

<script> prettyPrint(); </script>
@@ -162,7 +162,7 @@
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 01:32:17 GMT+0000 (Greenwich Mean Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 17:25:00 GMT+0000 (Greenwich Mean Time)
</footer>

<script> prettyPrint(); </script>
@@ -1050,7 +1050,7 @@


<div class="description">
Generates an array of objects which contain information about each available fileFile info objects contain the following fields: fileName, uploader, fileType, fileSize, fileCat, timeTillDelete, dateUploaded, url
Retrieves the name of the chosen file
</div>


@@ -1166,7 +1166,7 @@

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="modules_download.js.html">modules/download.js</a>, <a href="modules_download.js.html#line265">line 265</a>
<a href="modules_download.js.html">modules/download.js</a>, <a href="modules_download.js.html#line264">line 264</a>
</li></ul></dd>


@@ -2054,7 +2054,7 @@
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 01:32:17 GMT+0000 (Greenwich Mean Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 17:25:00 GMT+0000 (Greenwich Mean Time)
</footer>

<script> prettyPrint(); </script>
@@ -1467,7 +1467,7 @@
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 01:32:17 GMT+0000 (Greenwich Mean Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 17:25:00 GMT+0000 (Greenwich Mean Time)
</footer>

<script> prettyPrint(); </script>
@@ -162,7 +162,7 @@
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 01:32:17 GMT+0000 (Greenwich Mean Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 17:25:00 GMT+0000 (Greenwich Mean Time)
</footer>

<script> prettyPrint(); </script>
@@ -1686,7 +1686,7 @@
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 01:32:17 GMT+0000 (Greenwich Mean Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 17:25:00 GMT+0000 (Greenwich Mean Time)
</footer>

<script> prettyPrint(); </script>
@@ -162,7 +162,7 @@
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 01:32:17 GMT+0000 (Greenwich Mean Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 17:25:00 GMT+0000 (Greenwich Mean Time)
</footer>

<script> prettyPrint(); </script>
@@ -823,7 +823,7 @@
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 01:32:17 GMT+0000 (Greenwich Mean Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 17:25:00 GMT+0000 (Greenwich Mean Time)
</footer>

<script> prettyPrint(); </script>
@@ -162,7 +162,7 @@
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 01:32:17 GMT+0000 (Greenwich Mean Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 17:25:00 GMT+0000 (Greenwich Mean Time)
</footer>

<script> prettyPrint(); </script>
@@ -282,8 +282,7 @@ module.exports = class Download {
}

/**
* Generates an array of objects which contain information about each available file
* File info objects contain the following fields: fileName, uploader, fileType, fileSize, fileCat, timeTillDelete, dateUploaded, url
* Retrieves the name of the chosen file
* @async
* @memberof module:download
* @param {string} source - Username of the user who uploaded the file.
@@ -319,7 +318,7 @@ module.exports = class Download {
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 01:32:16 GMT+0000 (Greenwich Mean Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 17:25:00 GMT+0000 (Greenwich Mean Time)
</footer>

<script> prettyPrint(); </script>
@@ -231,7 +231,7 @@ module.exports = class Remove {
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 01:32:16 GMT+0000 (Greenwich Mean Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 17:25:00 GMT+0000 (Greenwich Mean Time)
</footer>

<script> prettyPrint(); </script>
@@ -274,7 +274,7 @@ module.exports = class Upload {
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 01:32:16 GMT+0000 (Greenwich Mean Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 17:25:00 GMT+0000 (Greenwich Mean Time)
</footer>

<script> prettyPrint(); </script>
@@ -142,7 +142,7 @@ module.exports = class User {
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 01:32:16 GMT+0000 (Greenwich Mean Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 17:25:00 GMT+0000 (Greenwich Mean Time)
</footer>

<script> prettyPrint(); </script>
@@ -33,7 +33,7 @@ const defaultPort = 8080
const port = process.env.PORT || defaultPort
const dbName = 'website.db'
const domainName = 'http://localhost:8080'
const expiryCheckInterval = 300000 // Three minutes
const expiryCheckInterval = 200000 // Two Minutes

/**
* The secure home page.
@@ -153,7 +153,7 @@ router.post('/upload', koaBody, async ctx => {
const uploadResult = await upload.uploadFile(path, name, ctx.session.username, targetUser) // Throws error if not successful
ctx.redirect(`/shareFile?h=${uploadResult}`) // Successful upload
} catch (err) {
await ctx.render('error', { message: err.message })
await ctx.redirect(`/upload?message=${err.message}`)
}
})

@@ -216,7 +216,7 @@ router.get('/file', async ctx => {
ctx.body = fs.createReadStream(filePath)
ctx.set('Content-disposition', `attachment; filename=${fileName}`) // Lets the user download the file
const remover = await new Remove(dbName)
const timer = 500000 // Sets timer amount
const timer = 60000 // Sets timer amount (1 Minute)
setTimeout(() => {
remover.removeFile(sourceUser, hash)
}, timer) // Delete the file after approx. 5 minutes to allow user time to download it
@@ -254,8 +254,7 @@ module.exports = class Download {
}

/**
* Generates an array of objects which contain information about each available file
* File info objects contain the following fields: fileName, uploader, fileType, fileSize, fileCat, timeTillDelete, dateUploaded, url
* Retrieves the name of the chosen file
* @async
* @memberof module:download
* @param {string} source - Username of the user who uploaded the file.

0 comments on commit 71b429b

Please sign in to comment.