Skip to content

Svg files not loading in Chrome/Safari when "preview"ed #144

Description

@ustamansangat

def responseStreamer(url: URL) =
new ResponseStreamer { def stream(os:OutputStream): Unit = {
val is = url.openStream
try {
val buf = new Array[Byte](1024)
Iterator.continually(is.read(buf)).takeWhile(_ != -1)
.foreach(os.write(buf, 0, _))
} finally {
is.close
}
} }
.

The above doesn't set a Content-Type response header, the browser displays it as a broken image.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions