1# Code on Val Town
2
3
4
5Adds a "Code on Val Town" ribbon to your page. This lets your website visitors navigate to the code behind it.
1# Code on Val Town
2
3
4
5Adds a "Code on Val Town" ribbon to your page. This lets your website visitors navigate to the code behind it.
1# Code on Val Town
2
3
4
5Adds a "Code on Val Town" ribbon to your page. This lets your website visitors navigate to the code behind it.
3This is a lightweight Blob Admin interface to view and debug your Blob data.
4
5
6
7Use this button to install the val:
10* Create a [Val Town API token](https://www.val.town/settings/api), open the browser preview of this val, and use the API token as the password to log in.
11
12<img width=500 src="https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/7077d1b5-1fa7-4a9b-4b93-f8d01d3e4f00/public"/>
10* Create a [Val Town API token](https://www.val.town/settings/api), open the browser preview of this val, and use the API token as the password to log in.
11
12<img width=500 src="https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/7077d1b5-1fa7-4a9b-4b93-f8d01d3e4f00/public"/>
10* Create a [Val Town API token](https://www.val.town/settings/api), open the browser preview of this val, and use the API token as the password to log in.
11
12<img width=500 src="https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/7077d1b5-1fa7-4a9b-4b93-f8d01d3e4f00/public"/>
36 <meta charset="UTF-8">
37 <meta name="viewport" content="width=device-width, initial-scale=1.0">
38 <title>Image Generation Form</title>
39 <style>
40 body {
72<body>
73 <div class="form-container">
74 <input id="description" type="text" placeholder="Image description">
75 <input id="exclude" type="text" placeholder="Things to exclude in the image">
76 <select id="aspect-ratio">
77 <option value="1:1">1:1</option>
85 <option value="5:12">5:12</option>
86 </select>
87 <button onclick="submitForm()">Generate Image</button>
88 </div>
89 <script>
3 * - File upload through input and drag-and-drop
4 * - Automatic MIME type detection
5 * - Preview of the uploaded file (image, video, audio, or text)
6 * - Copy button to easily copy the generated data URI
7 *
144
145 preview.innerHTML = '';
146 if (file.type.startsWith('image/')) {
147 const img = document.createElement('img');
148 img.src = dataUri;
3Manage your vals from a webdav client (ex: https://cyberduck.io/)
4
5
6
7> ⚠️ some webdav operations are not supported, so support can vary between clients.