Files
progcode/web/public/assets/editorial/2018/php-private-download-flow.svg
T
huncode 90692f0f16
Build and deploy / deploy (push) Successful in 15s
raise editorial quality gate and revise 2018 spring
2026-07-31 09:20:37 +03:00

77 lines
5.0 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1600 900" role="img" aria-labelledby="title desc">
<title id="title">Выдача приватного документа через PHP</title>
<desc id="desc">Последовательность запроса: браузер, маршрут приложения, база документов, закрытое хранилище, HTTP-ответ.</desc>
<defs>
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
<stop offset="0" stop-color="#f6f8fc"/>
<stop offset="1" stop-color="#edf5f1"/>
</linearGradient>
<filter id="shadow" x="-20%" y="-20%" width="140%" height="140%">
<feDropShadow dx="0" dy="12" stdDeviation="16" flood-color="#123049" flood-opacity=".11"/>
</filter>
<marker id="right-arrow" viewBox="0 0 12 12" refX="11" refY="6" markerWidth="10" markerHeight="10" orient="auto">
<path d="M 0 1 L 11 6 L 0 11 z" fill="#3f6b78"/>
</marker>
<marker id="left-arrow" viewBox="0 0 12 12" refX="11" refY="6" markerWidth="10" markerHeight="10" orient="auto">
<path d="M 0 1 L 11 6 L 0 11 z" fill="#6c8f9c"/>
</marker>
<style>
.title { font: 700 44px Inter, Arial, sans-serif; fill: #17324a; }
.subtitle { font: 400 23px Inter, Arial, sans-serif; fill: #597080; }
.actor { font: 700 22px Inter, Arial, sans-serif; fill: #17324a; text-anchor: middle; }
.role { font: 600 16px Inter, Arial, sans-serif; fill: #6b7d8d; letter-spacing: 1.4px; text-anchor: middle; }
.label { font: 600 18px Inter, Arial, sans-serif; fill: #34566a; }
.code { font: 600 17px Menlo, Consolas, monospace; fill: #236779; }
.note { font: 400 18px Inter, Arial, sans-serif; fill: #466174; }
</style>
</defs>
<rect width="1600" height="900" fill="url(#bg)"/>
<text x="104" y="110" class="title">Приватный файл: доступ проверяется до чтения с диска</text>
<text x="104" y="152" class="subtitle">URL содержит ID записи. Настоящий ключ и путь остаются за маршрутом приложения.</text>
<g filter="url(#shadow)">
<rect x="112" y="238" width="236" height="108" rx="22" fill="#ffffff"/>
<text x="230" y="282" class="actor">Браузер</text>
<text x="230" y="314" class="role">ПОЛЬЗОВАТЕЛЬ</text>
<rect x="466" y="238" width="250" height="108" rx="22" fill="#ffffff"/>
<text x="591" y="282" class="actor">Маршрут PHP</text>
<text x="591" y="314" class="role">АВТОРИЗАЦИЯ</text>
<rect x="837" y="238" width="248" height="108" rx="22" fill="#ffffff"/>
<text x="961" y="282" class="actor">documents</text>
<text x="961" y="314" class="role">БАЗА ДАННЫХ</text>
<rect x="1210" y="238" width="280" height="108" rx="22" fill="#ffffff"/>
<text x="1350" y="282" class="actor">Закрытый каталог</text>
<text x="1350" y="314" class="role">ФАЙЛОВАЯ СИСТЕМА</text>
</g>
<line x1="230" y1="346" x2="230" y2="708" stroke="#b8cbd5" stroke-width="3" stroke-dasharray="9 10"/>
<line x1="591" y1="346" x2="591" y2="708" stroke="#b8cbd5" stroke-width="3" stroke-dasharray="9 10"/>
<line x1="961" y1="346" x2="961" y2="708" stroke="#b8cbd5" stroke-width="3" stroke-dasharray="9 10"/>
<line x1="1350" y1="346" x2="1350" y2="708" stroke="#b8cbd5" stroke-width="3" stroke-dasharray="9 10"/>
<path d="M230 414 H580" fill="none" stroke="#3f6b78" stroke-width="6" stroke-linecap="round" marker-end="url(#right-arrow)"/>
<text x="308" y="398" class="label">1. GET</text>
<text x="308" y="430" class="code">/documents/42/download</text>
<path d="M591 490 H950" fill="none" stroke="#3f6b78" stroke-width="6" stroke-linecap="round" marker-end="url(#right-arrow)"/>
<text x="684" y="474" class="label">2. Проверка владельца</text>
<text x="684" y="506" class="code">id + owner_id + status</text>
<path d="M961 562 H1339" fill="none" stroke="#3f6b78" stroke-width="6" stroke-linecap="round" marker-end="url(#right-arrow)"/>
<text x="1069" y="546" class="label">3. Найден ключ</text>
<text x="1069" y="578" class="code">storage_key.pdf</text>
<path d="M1339 634 H602" fill="none" stroke="#6c8f9c" stroke-width="6" stroke-linecap="round" marker-end="url(#left-arrow)"/>
<text x="1000" y="618" class="label">4. PHP читает только закрытый путь</text>
<path d="M580 706 H241" fill="none" stroke="#27846e" stroke-width="7" stroke-linecap="round" marker-end="url(#left-arrow)"/>
<text x="314" y="689" class="label">5. HTTP-ответ</text>
<text x="314" y="724" class="code">Content-Type: application/pdf</text>
<rect x="112" y="777" width="1378" height="66" rx="18" fill="#ffffff" stroke="#c9dcda" stroke-width="2"/>
<text x="146" y="818" class="note">Прямого URL к каталогу нет: запись в базе связывает пользователя с ключом, а маршрут решает, можно ли читать файл.</text>
</svg>