Spaces:
Build error
Build error
| <html lang="en"> | |
| <head> | |
| <link rel="preload" as="style" href="//cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/theme/seti.min.css"> | |
| <link rel="preload" as="style" href="//cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/codemirror.min.css"> | |
| <title>Carbon | Create and share beautiful images of your source code</title> | |
| <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/theme/seti.min.css"> | |
| <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/codemirror.min.css"> | |
| <script defer="" nomodule="" src="https://carbon.now.sh/_next/static/chunks/polyfills-5cd94c89d3acac5f.js"></script><script src="https://carbon.now.sh/_next/static/chunks/webpack-d06b5ae06e50cd15.js" defer=""></script><script src="https://carbon.now.sh/_next/static/chunks/framework-bb5c596eafb42b22.js" defer=""></script><script src="https://carbon.now.sh/_next/static/chunks/main-0c2f695881b30dce.js" defer=""></script><script src="https://carbon.now.sh/_next/static/chunks/pages/_app-3434178aeb3cc8e0.js" defer=""></script><script src="https://carbon.now.sh/_next/static/chunks/ff239f9d-ca8347500655c670.js" defer=""></script><script src="https://carbon.now.sh/_next/static/chunks/f65a48b9-067decfb353bc5de.js" defer=""></script><script src="https://carbon.now.sh/_next/static/chunks/369-e8f2ba2cc85c0dd6.js" defer=""></script><script src="https://carbon.now.sh/_next/static/chunks/152-b45757b9176f674c.js" defer=""></script><script src="https://carbon.now.sh/_next/static/chunks/524-05696a2671cf01d2.js" defer=""></script><script src="https://carbon.now.sh/_next/static/chunks/94-c1d96e91c5f9c3c9.js" defer=""></script><script src="https://carbon.now.sh/_next/static/chunks/2-70c32d541379fb99.js" defer=""></script><script src="https://carbon.now.sh/_next/static/chunks/867-624f974e1910ffb8.js" defer=""></script><script src="https://carbon.now.sh/_next/static/chunks/pages/embed/%5Bid%5D-8154db841bf0d7fa.js" defer=""></script><script src="https://carbon.now.sh/_next/static/5AMzUELPXC7eY2oJtbjtp/_buildManifest.js" defer=""></script><script src="https://carbon.now.sh/_next/static/5AMzUELPXC7eY2oJtbjtp/_ssgManifest.js" defer=""></script><script src="https://carbon.now.sh/_next/static/5AMzUELPXC7eY2oJtbjtp/_middlewareManifest.js" defer=""></script> | |
| </head> | |
| <body > | |
| <div id="__next" data-reactroot=""> | |
| <div > | |
| <div class=""> | |
| <div id="" class=""> | |
| <div class=""> | |
| <div class="jsx-4023755556 window-controls"> | |
| <svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"> | |
| <g fill="none" fill-rule="evenodd" transform="translate(1 1)"> | |
| <circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle> | |
| <circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle> | |
| <circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle> | |
| </g> | |
| </svg> | |
| <div class="jsx-1170653115"><input aria-label="Image title" type="text" spellcheck="false" class="jsx-1170653115" value=""></div> | |
| <div class="jsx-4023755556 copy-button"> | |
| <button aria-label="Copy Button" class="jsx-3777774159"> | |
| <svg width="19.44" height="24" viewBox="0 0 13 16" fill="none" xmlns="http://www.w3.org/2000/svg"> | |
| <path d="M8 0H3.40385C2.55385 0 1.84615 0.669231 1.84615 1.51923V1.84615H1.55769C0.707692 1.84615 0 2.51538 0 3.36538V14.4423C0 15.2923 0.707692 16 1.55769 16H9.55769C10.4077 16 11.0769 15.2923 11.0769 14.4423V14.1538H11.4038C12.2538 14.1538 12.9231 13.4462 12.9231 12.5962V4.92308L8 0ZM8 1.71538L11.2077 4.92308H8V1.71538ZM9.84615 14.4423C9.84615 14.6231 9.71538 14.7692 9.55769 14.7692H1.55769C1.38846 14.7692 1.23077 14.6115 1.23077 14.4423V3.36538C1.23077 3.20769 1.37692 3.07692 1.55769 3.07692H1.84615V12.9038C1.84615 13.7538 2.24615 14.1538 3.09615 14.1538H9.84615V14.4423ZM11.6923 12.5962C11.6923 12.7769 11.5615 12.9231 11.4038 12.9231H3.40385C3.23462 12.9231 3.07692 12.7654 3.07692 12.5962V1.51923C3.07692 1.36154 3.22308 1.23077 3.40385 1.23077H6.76923V6.15385H11.6923V12.5962Z" fill="#858585"></path> | |
| </svg> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="react-codemirror2 CodeMirror__container window-theme__sharp"> | |
| <div class="CodeMirror cm-s-seti CodeMirror-wrap" translate="no"> | |
| <div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 0px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" readonly="" aria-label="Code editor" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; min-height: 1em; outline: none;"></textarea></div> | |
| <div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div> | |
| <div class="CodeMirror-gutter-filler" cm-not-content="true"></div> | |
| <div class="CodeMirror-scroll" tabindex="-1"> | |
| <div class="CodeMirror-sizer" style="margin-left: 29px; margin-bottom: -17px; border-right-width: 33px; min-height: 282px; padding-right: 0px; padding-bottom: 0px;"> | |
| <div style="position: relative; top: 0px;"> | |
| <div class="CodeMirror-lines" role="presentation"> | |
| <div role="presentation" style="position: relative; outline: none;"> | |
| <div class="CodeMirror-measure"> | |
| <span><span></span>x</span> | |
| <div class="CodeMirror-linenumber CodeMirror-gutter-elt"> | |
| <div>18</div> | |
| </div> | |
| </div> | |
| <div class="CodeMirror-measure"></div> | |
| <div style="position: relative; z-index: 1;"></div> | |
| <div class="CodeMirror-cursors"> | |
| <div class="CodeMirror-cursor" style="left: 347.138px; top: 258.4px; height: 15.2px;"> </div> | |
| </div> | |
| <div class="CodeMirror-code" role="presentation" style=""> | |
| <div style="position: relative;"> | |
| <div class="CodeMirror-gutter-wrapper" aria-hidden="true" style="left: -29px;"> | |
| <div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div> | |
| </div> | |
| <pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">var</span> <span class="cm-def">formdata</span> <span class="cm-operator">=</span> <span class="cm-keyword">new</span> <span class="cm-variable">FormData</span>()</span></pre> | |
| </div> | |
| <div style="position: relative;"> | |
| <div class="CodeMirror-gutter-wrapper" aria-hidden="true" style="left: -29px;"> | |
| <div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div> | |
| </div> | |
| <pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-variable">formdata</span>.<span class="cm-property">append</span>(</span></pre> | |
| </div> | |
| <div style="position: relative;"> | |
| <div class="CodeMirror-gutter-wrapper" aria-hidden="true" style="left: -29px;"> | |
| <div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div> | |
| </div> | |
| <pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-string">'image'</span>,</span></pre> | |
| </div> | |
| <div style="position: relative;"> | |
| <div class="CodeMirror-gutter-wrapper" aria-hidden="true" style="left: -29px;"> | |
| <div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div> | |
| </div> | |
| <pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-variable">fileInput</span>.<span class="cm-property">files</span>[<span class="cm-number">0</span>],</span></pre> | |
| </div> | |
| <div style="position: relative;"> | |
| <div class="CodeMirror-gutter-wrapper" aria-hidden="true" style="left: -29px;"> | |
| <div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div> | |
| </div> | |
| <pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-string">'demo.png'</span></span></pre> | |
| </div> | |
| <div style="position: relative;"> | |
| <div class="CodeMirror-gutter-wrapper" aria-hidden="true" style="left: -29px;"> | |
| <div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div> | |
| </div> | |
| <pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">)</span></pre> | |
| </div> | |
| <div style="position: relative;"> | |
| <div class="CodeMirror-gutter-wrapper" aria-hidden="true" style="left: -29px;"> | |
| <div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div> | |
| </div> | |
| <pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-variable">formdata</span>.<span class="cm-property">append</span>(<span class="cm-string">'upscale'</span>, <span class="cm-string">'4'</span>)</span></pre> | |
| </div> | |
| <div style="position: relative;"> | |
| <div class="CodeMirror-gutter-wrapper" aria-hidden="true" style="left: -29px;"> | |
| <div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div> | |
| </div> | |
| <pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text=""></span></span></pre> | |
| </div> | |
| <div style="position: relative;"> | |
| <div class="CodeMirror-gutter-wrapper" aria-hidden="true" style="left: -29px;"> | |
| <div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div> | |
| </div> | |
| <pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">var</span> <span class="cm-def">requestOptions</span> <span class="cm-operator">=</span> {</span></pre> | |
| </div> | |
| <div style="position: relative;"> | |
| <div class="CodeMirror-gutter-wrapper" aria-hidden="true" style="left: -29px;"> | |
| <div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div> | |
| </div> | |
| <pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-property">method</span>: <span class="cm-string">'POST'</span>,</span></pre> | |
| </div> | |
| <div style="position: relative;"> | |
| <div class="CodeMirror-gutter-wrapper" aria-hidden="true" style="left: -29px;"> | |
| <div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div> | |
| </div> | |
| <pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-property">body</span>: <span class="cm-variable">formdata</span>,</span></pre> | |
| </div> | |
| <div style="position: relative;"> | |
| <div class="CodeMirror-gutter-wrapper" aria-hidden="true" style="left: -29px;"> | |
| <div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">12</div> | |
| </div> | |
| <pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-property">redirect</span>: <span class="cm-string">'follow'</span>,</span></pre> | |
| </div> | |
| <div style="position: relative;"> | |
| <div class="CodeMirror-gutter-wrapper" aria-hidden="true" style="left: -29px;"> | |
| <div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">13</div> | |
| </div> | |
| <pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">}</span></pre> | |
| </div> | |
| <div style="position: relative;"> | |
| <div class="CodeMirror-gutter-wrapper" aria-hidden="true" style="left: -29px;"> | |
| <div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">14</div> | |
| </div> | |
| <pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text=""></span></span></pre> | |
| </div> | |
| <div style="position: relative;"> | |
| <div class="CodeMirror-gutter-wrapper" aria-hidden="true" style="left: -29px;"> | |
| <div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">15</div> | |
| </div> | |
| <pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-variable">fetch</span>(<span class="cm-string">'http://127.0.0.1:8080/api/imageUpscaler/'</span>, <span class="cm-variable">requestOptions</span>)</span></pre> | |
| </div> | |
| <div style="position: relative;"> | |
| <div class="CodeMirror-gutter-wrapper" aria-hidden="true" style="left: -29px;"> | |
| <div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">16</div> | |
| </div> | |
| <pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> .<span class="cm-property">then</span>((<span class="cm-def">response</span>) <span class="cm-operator">=></span> <span class="cm-variable-2">response</span>.<span class="cm-property">text</span>())</span></pre> | |
| </div> | |
| <div style="position: relative;"> | |
| <div class="CodeMirror-gutter-wrapper" aria-hidden="true" style="left: -29px;"> | |
| <div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">17</div> | |
| </div> | |
| <pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> .<span class="cm-property">then</span>((<span class="cm-def">result</span>) <span class="cm-operator">=></span> <span class="cm-variable">console</span>.<span class="cm-property">log</span>(<span class="cm-variable-2">result</span>))</span></pre> | |
| </div> | |
| <div style="position: relative;"> | |
| <div class="CodeMirror-gutter-wrapper" aria-hidden="true" style="left: -29px;"> | |
| <div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">18</div> | |
| </div> | |
| <pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> .<span class="cm-property">catch</span>((<span class="cm-def">error</span>) <span class="cm-operator">=></span> <span class="cm-variable">console</span>.<span class="cm-property">log</span>(<span class="cm-string">'error'</span>, <span class="cm-variable-2">error</span>))</span></pre> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div style="position: absolute; height: 33px; width: 1px; border-bottom: 0px solid transparent; top: 282px;"></div> | |
| <div class="CodeMirror-gutters" style="height: 315px;"> | |
| <div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="jsx-2474363108 container-bg"> | |
| <div class="jsx-2474363108 white eliminateOnRender"></div> | |
| <div class="jsx-2474363108 alpha eliminateOnRender"></div> | |
| <div class="jsx-2474363108 bg"></div> | |
| </div> | |
| <div role="separator" aria-orientation="vertical" aria-valuemin="320" aria-valuemax="1280" class="jsx-3596412833 handler"></div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"snippet":{"lineNumbers":true,"language":"javascript","userId":"Sczi6aCsyaUKSX39LtIlsGA2Jfu1","paddingVertical":"0px","createdAt":1680131522,"highlights":null,"name":"ImageUpscaler-Javascript","paddingHorizontal":"0px","windowTheme":"sharp","code":"var formdata = new FormData()\nformdata.append(\n 'image',\n fileInput.files[0],\n 'demo.png'\n)\nformdata.append('upscale', '4')\n\nvar requestOptions = {\n method: 'POST',\n body: formdata,\n redirect: 'follow',\n}\n\nfetch('http://127.0.0.1:8080/api/imageUpscaler/', requestOptions)\n .then((response) =\u003e response.text())\n .then((result) =\u003e console.log(result))\n .catch((error) =\u003e console.log('error', error))","updatedAt":1680132113,"id":"KbCfzCw1EdUr011H2GuQ"}},"__N_SSP":true},"page":"/embed/[id]","query":{"id":"KbCfzCw1EdUr011H2GuQ"},"buildId":"5AMzUELPXC7eY2oJtbjtp","isFallback":false,"gssp":true,"scriptLoader":[]}</script><script async="" src="https://www.googletagmanager.com/gtag/js?id=G-27CQ8LVS7D"></script> | |
| <next-route-announcer> | |
| <p aria-live="assertive" id="__next-route-announcer__" role="alert" style="border: 0px; clip: rect(0px, 0px, 0px, 0px); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; width: 1px; white-space: nowrap; overflow-wrap: normal;"></p> | |
| </next-route-announcer> | |
| </body> | |
| </html> |