You are viewing limited content. For full access, please sign in.

Question

Question

Does Self hosted Laserfiche web API support file streaming

asked on October 2, 2024

A client is developing a stand alone web application that will interface with their on-prem Laserfiche via the Laserfiche web API. They will be accessing Audio files stored in the repository. They want to know if the API will support streaming of the audio files versus making the client download the entire audio file before playing it.

0 0

Replies

replied on October 2, 2024 Show version history

As a proof of concept, I verified that I could upload an audio/x-m4a file to Laserfiche cloud via Web Client and then obtain the download URL using Repository API V2 Export (as of 10/2024 V2 is not available on self-hosted yet).

Repository API V1 Export does not return a URL but it returns the stream itself that could be converted to a temporary URL to obtain a similar result.

I then plugged the download URL in the src attribute of the HTML audio tag of a custom web page and play the audio back: 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Audio Playback</title>
</head>
<body>
    <h1>Audio Playback Example</h1>
    <audio controls>
        <source src="https://app.laserfiche.com/file/download/xxxx" type="audio/mpeg">
        Your browser does not support the audio element.
    </audio>
</body>
</html>

 

1 0
replied on October 3, 2024

Thanks Paolo,

Sounds like this route is not available for self hosted yet :(

0 0
replied on October 3, 2024

Not directly, but export edoc for self-hosted V1 is the same as Repository API V1 in cloud and returns the stream itself so you would be able to use Paolo's workaround in order to convert the stream to a temporary URL to obtain a similar result to V2.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.