Files
Claper/storage.html

182 lines
6.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.29.4">
<meta name="project" content="Claper v1.7.0">
<title>Presentation storage — Claper v1.7.0</title>
<link rel="stylesheet" href="dist/html-elixir-HHVY3JYD.css" />
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-E6912480.js"></script>
<script src="docs_config.js"></script>
<script async src="dist/html-JDI3AVDD.js"></script>
</head>
<body data-type="extras" class="page-extra">
<script>
try {
var settings = JSON.parse(localStorage.getItem('ex_doc:settings') || '{}');
if (settings.theme === 'dark' ||
((settings.theme === 'system' || settings.theme == null) &&
window.matchMedia('(prefers-color-scheme: dark)').matches)
) {
document.body.classList.add('dark')
}
} catch (error) { }
</script>
<div class="main">
<button class="sidebar-button sidebar-toggle" aria-label="toggle sidebar">
<i class="ri-menu-line ri-lg" title="Collapse/expand sidebar"></i>
</button>
<section class="sidebar">
<form class="sidebar-search" action="search.html">
<button type="submit" class="search-button" aria-label="Submit Search">
<i class="ri-search-2-line" aria-hidden="true" title="Submit search"></i>
</button>
<button type="button" tabindex="-1" class="search-close-button" aria-label="Cancel Search">
<i class="ri-close-line ri-lg" aria-hidden="true" title="Cancel search"></i>
</button>
<label class="search-label">
<p class="sr-only">Search</p>
<input name="q" type="text" class="search-input" placeholder="Search..." aria-label="Input your search terms" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
</label>
</form>
<div class="autocomplete">
<div class="autocomplete-results">
</div>
</div>
<div class="sidebar-header">
<a href="https://claper.co">
<img src="assets/logo.png" alt="Claper" class="sidebar-projectImage">
</a>
<div class="sidebar-projectDetails">
<a href="https://claper.co" class="sidebar-projectName" translate="no">
Claper
</a>
<div class="sidebar-projectVersion" translate="no">
v1.7.0
</div>
</div>
<ul class="sidebar-listNav">
<li><a id="extras-list-link" href="#full-list">GUIDES</a></li>
<li><a id="modules-list-link" href="#full-list">Modules</a></li>
</ul>
</div>
<div class="gradient"></div>
<ul id="full-list"></ul>
</section>
<section class="content">
<output role="status" id="toast"></output>
<div class="content-outer">
<div id="content" class="content-inner">
<h1>
<button class="icon-action display-settings">
<i class="ri-settings-3-line"></i>
<span class="sr-only">Settings</span>
</button>
<a href="https://github.com/ClaperCo/Claper/blob/main/guides/introduction/storage.md#L1" title="View Source" class="icon-action" rel="help">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
<span>Presentation storage</span>
</h1>
<p>You can configure different storage options for your presentations. By default, Claper uses the local storage.</p><p>Each presentation has a unique hash that is generated in two steps, first with <code class="inline">:erlang.phash2(&quot;#{code}-#{name}&quot;)</code> and then <code class="inline">:erlang.phash2(&quot;#{hash}-#{System.system_time(:second)}&quot;)</code>.</p><h2 id="local-storage" class="section-heading">
<a href="#local-storage" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">local-storage</p>
</a>
Local storage
</h2>
<p>The local storage is the default storage option. It stores the presentations in the <code class="inline">priv/static/uploads/[hash]</code> folder.</p><p>You can change the directory where the presentations are stored by changing the <code class="inline">PRESENTATION_STORAGE_DIR</code> variable in the <code class="inline">.env</code> file.</p><p>The <code class="inline">uploads</code> folder will be created automatically if it doesn't exist.</p><h2 id="s3-storage" class="section-heading">
<a href="#s3-storage" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">s3-storage</p>
</a>
S3 storage
</h2>
<p>You can use S3 storage to store your presentations.</p><p>When user upload a new presentation, the destination file is uploaded to S3 in your bucket in <code class="inline">presentations/[hash]</code> and the local file is deleted.</p>
<div class="bottom-actions">
<div class="bottom-actions-item">
<a href="deployment.html" class="bottom-actions-button" rel="prev">
<span class="subheader">
← Previous Page
</span>
<span class="title">
Deployment
</span>
</a>
</div>
<div class="bottom-actions-item">
<a href="features.html" class="bottom-actions-button" rel="next">
<span class="subheader">
Next Page →
</span>
<span class="title">
Features
</span>
</a>
</div>
</div>
<footer class="footer">
<p>
<span class="line">
<button class="a-main footer-button display-quick-switch" title="Search HexDocs packages">
Search HexDocs
</button>
<a href="Claper.epub" title="ePub version">
Download ePub version
</a>
</span>
</p>
<p class="built-using">
Built using
<a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" target="_blank" rel="help noopener" translate="no">ExDoc</a> (v0.29.4) for the
<a href="https://elixir-lang.org" title="Elixir" target="_blank" translate="no">Elixir programming language</a>
</p>
</footer>
</div>
</div>
</section>
</div>
</body>
</html>