Anonymous Page

Source Code

    import com.fastscala.templates.bootstrap5.classes.BSHelpers._
    Js.rerenderable(rerenderer => implicit fsc => {
      div.border.p_2.rounded.apply {
        h3.apply("Upload an image:") ++
          FileUpload(uploadedFile => {
            rerenderer.rerender()
            Js.redirectTo(fsc.anonymousPageURL(implicit fsc => {
              new VisualizeUploadedImageAnonymousPage(uploadedFile.head.contentType, uploadedFile.head.content).render()
            }, "visualize_image"))
          })
      }
    }).render()

Upload an image: