rstudio / connectwidgets

The {connectwidgets} package allows you to curate your content on RStudio Connect, helping to create organized groups of content within an RMarkdown document or Shiny app.
https://rstudio.github.io/connectwidgets/
Other
21 stars 7 forks source link

preview image in connectwidgets #71

Open alipprc opened 2 years ago

alipprc commented 2 years ago

I can not get the app preview photo when I deploy the markdown to connect server :

--- title: '' output: html_document: theme: bootswatch: pulse ---


knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)

client <- connect(
   server  = "server",
   api_key = "api"
  )

all_content <- client %>%
  content()

sample_content <- all_content %>% dplyr::filter(content_category != "pin") %>%
  arrange(desc(updated_time))
 sample_content%>% rsc_grid()

The deployed results looks like :

Screenshot 2022-06-02 215014

But in Connect dashboard itself it looks like this :

Screenshot 2022-06-02 215014

Do I need to do any special setting or pass any additional parameters to get the images ?

I'm using the package version 0.1.1 on R version 4.1.2 and the connect version 2022.05

Lytol commented 2 years ago

There are a few reasons why images may not be displayed outlined in https://docs.rstudio.com/how-to-guides/users/pro-tips/widgets/:

If you're still not sure why the image isn't appearing, you can look under the Network tab in your browser's Dev Tools to see the image requests. That might give more insight into why the images are not appearing.

alipprc commented 2 years ago

@Lytol , thanks for the feedback.

To clarify, I logged in with my admin account to connect. I deployed all the apps myself (with the same account). All the app access set to "Anyone no login required". The HTTP response is 200 ! but I don't see the image in grid view : tt

Furthermore, if I change the setting on one of the deployed app from "Anyone no login required" to "All user login required", the status code will change to 403 !!! I have no explanation to this ! I am the app owner, I deployed the app with the same account that I am viewing the content. why a permission denied response I should get ?!

tt1