Skip to content

Error 403 with file_uploader on stlite/browser 1.8.0 #2068

@evan-barentin

Description

@evan-barentin

Hi,

I am currently deploying a small streamlit app with some file upload and since stlite 1.8.0 I continuously get the same Unexpected status code 403 when uploading file. error. This behavior disappears when using the prior version of stlite.

Here is a minimal example in order to reproduce this error.

<!doctype html>
<html>
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
    <title>Stlite App</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@stlite/browser@1.8.0/build/stlite.css" />
    <script type="module" src="https://cdn.jsdelivr.net/npm/@stlite/browser@1.8.0/build/stlite.js"></script>
</head>
<body>
    <streamlit-app>
        import streamlit as st

        uploaded_file = st.file_uploader("Choose a file")
        if uploaded_file is not None:
            # To read file as bytes:
            st.write("uploaded")
    </streamlit-app>
</body>
</html>

If you change the 1.8.0 with the previous version 1.7.3, uploading works correctly.

Is there something that I am missing ?

At last, thank you for your project which help me a lot !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions