Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

f7File not working on Android when uploading image #221

Open
dannyvolkaerts opened this issue Apr 15, 2022 · 0 comments
Open

f7File not working on Android when uploading image #221

dannyvolkaerts opened this issue Apr 15, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@dannyvolkaerts
Copy link

dannyvolkaerts commented Apr 15, 2022

I am not a programmer so maybe I overlooked something when trying my shinyMobile app on my Android device..
f7File functionality is not working on Android device when I try to upload an image of the phone.
IMG7456.JPG is correctly displayed when I use the function but the input$up is empty when I try to call it server-side.

MRE:
`
library(shiny)
library(shinyMobile)

ui = f7Page(
f7SingleLayout(
navbar = f7Navbar(title = "File handling"),
f7File("up", "Upload!"),
br(),
verbatimTextOutput("theinput"),
)
)

server = function(input, output) {
data <- reactive(input$up)
observe(
print(data()$datapath)
)
output$theinput <- renderText(input$up$datapath)
}

shinyApp(ui, server)
`

In the MRE after uploading a file/picture/... you will get the path to this file displayed. If the path is not displayed, this means there is no path and so no input$up available and further actions on the input$up will not work.
So when you run the app locally on your laptop/PC you will always get a path and the f7File function works. When running the app in shinyapps.io as I did (MREforAndroid) and open the app on an Android device you are able to select files and images on your device. When running the MRE I noticed that uploading a picture taken via Whatsapp is possible but to remain on topic: uploading an image from Album is not possible.
I don't think it has something to do with the file size since I took an image of 3,18MB and this was also not possible.

Thank you for your help!

@DivadNojnarg DivadNojnarg added the bug Something isn't working label Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants