-
Notifications
You must be signed in to change notification settings - Fork 72
Expand file tree
/
Copy pathproviders.html
More file actions
126 lines (109 loc) · 5.53 KB
/
providers.html
File metadata and controls
126 lines (109 loc) · 5.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!--
Copyright (C) 2025 Alexander Vanhee
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
SPDX-License-Identifier: GPL-3.0-or-later
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Learn how to upload images using Gradia's predefined or custom upload providers, with step-by-step setup instructions.">
<title>Providers</title>
<link rel="icon" href="assets/favicons/favicon.ico" type="image/x-icon">
<link rel="preconnect" href="https://rsms.me/">
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
<link rel="stylesheet" href="assets/styles/providers.css">
</head>
<body>
<div class="container">
<!-- Header -->
<header>
<div class="logo">
<img src="assets/images/logo.svg" alt="Gradia Logo" class="logo-image">
<span>Gradia</span>
</div>
<h1 class="title">Providers</h1>
<p class="subtitle">Quickly upload an edited image to your favorite providers</p>
<p style="padding-top: 1rem;">
Instead of only giving the option of one provider, Gradia allows you to either select one of the predefined ones or <strong>create your own</strong>.
This page explains the basic idea behind this system, provides some explanation for popular providers,
and includes information on how to craft commands for your own setup.
</p>
</header>
<!-- Introduction -->
<section class="card how-it-works">
<h2 class="section-title">How it works</h2>
<p class="description">
All providers are just a <strong>bash command</strong> behind the scene. Including all the predefined ones,
this makes it easy to add new options in the future and allows you to create custom ones as well.
</br>
The command simply receives the image path as <code class="inline-code">$1</code> and
outputs the final URL to stdout.</p>
<div style="margin-top: 1rem; margin-bottom: 1rem;">
<strong class="example-label">Example:</strong>
<pre class="code-block"><code>curl -F "file=@$1" https://api.service.com/upload | jq -r '.url'</code></pre>
</div>
<p><strong>Note:</strong> Not all commands or functions are available in the Flatpak or the Snap by default. You may need to modify
permissions. For Flatpak, this can be done via <a href="https://flathub.org/apps/com.github.tchx84.Flatseal"><strong>Flatseal</strong></a>.
</p>
</section>
<!-- Setup -->
<section class=" setup-section">
<h2 class="section-title">Basic Setup</h2>
<ol class="setup-steps card">
<li class="setup-step">
<span class="step-number">1</span>
<div class="step-content">
<strong class="step-title">Press the <strong>Select</strong> button in the "Image Upload Providers" section.</strong>
<span class="step-description">or craft a custom command</span>
</div>
</li>
<li class="setup-step ">
<span class="step-number">2</span>
<div class="step-content">
<strong class="step-title">Choose one of the predefined providers from the list</strong>
<span class="step-description">or pick "<strong>Custom Provider</strong>"</span>
</div>
</li>
<li class="setup-step">
<span class="step-number">3</span>
<div class="step-content">
<strong class="step-title">Review your option</strong>
<span class="step-description">make sure the option fits your needs.</span>
</div>
</li>
<li class="setup-step">
<span class="step-number">4</span>
<div class="step-content">
<strong class="step-title">Test it out</strong>
<span class="step-description">via the new button next to <strong>Save & Copy</strong></span>
</div>
</li>
</ol>
</section>
</div>
<script>
function copy(btn) {
const code = btn.parentElement.querySelector('code').textContent;
navigator.clipboard.writeText(code).then(() => {
btn.textContent = 'Copied!';
btn.classList.add('copied');
setTimeout(() => {
btn.textContent = 'Copy';
btn.classList.remove('copied');
}, 2000);
});
}
</script>
</body>
</html>