How to upload file to server like we upload file though community picture or attachment function?

I want to get the function like upload attachment and picture function.
st.file_uploader can not make it come true.
How to add attachment and picture like here we do when we ask a new question?