How to avoid text being in base64 with presign off

Hello

I’m running label studio 1.15.0 on Kubernetes alongside MinIO for S3 storage

Because I’m inside a Kubernetes Cluster I cannot use presigned URLs.

I’m using the default templates for anything text related.

If the data is an s3 url the browser retrieves the result then encodes it into base64 and the text to label is shown as:

data:text/plain;base64,dGhpcyBpcyBhIHNhbXBsZSB0ZXh0LCBkb24ndCBwZWVrCg==

Manually decoding that base64 code shows that the data was retrieved properly but encoded into base 64.

When I do the same for images it works and the image is displayed properly. Only text has this issue.

Is there a way to display the text as-is ?

The reason why I cannot use presigned URLS is that there isn’t an option for S3 endpoint that works well. The ingress endpoint to S3 is not accessible by label studio container… And the Kubernetes internal S3 endpoint is not accessible by the browser.

It seems it is not possible. When you turn off presigned URLs, LS always tries to read a file and pass it as a blob encoded with base64.

As a workaround, you can store your texts as JSONs (one task - one JSON) and disable the toggle “Treat every bucket object as a source file (if unchecked, treat every bucket object as a JSON-formatted task. Optional)”.

Why do you not use presigned URLs?

The workaround unfortunately isn’t working, it only loads my json text as a base64 encoded blob.

The reason why I cannot use presigned URLS is that there isn’t an option for S3 endpoint that works well. The ingress endpoint to S3 is not accessible by label studio container… And the Kubernetes internal S3 endpoint is not accessible by the browser.

I frankly would’ve loved to use it.