Fix image bug.

This commit is contained in:
Matt
2019-06-10 16:08:01 -05:00
parent 4612df0a99
commit 2aa401f80d
2 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ if(nrow(new_requests) > 0){
# Post one selected request # Post one selected request
post_text <- str_trunc(paste0(emoji, " ", request$title, " at ", str_squish(request$address), " (",request$url,"): ", request$description),500) post_text <- str_trunc(paste0(emoji, " ", request$title, " at ", str_squish(request$address), " (",request$url,"): ", request$description),500)
# Check for image # Check for image
if(nchar(request$image_thumbnail) > 1){ if(nchar(request$image_thumbnail, keepNA = F) > 2 ){
# Get the image # Get the image
download.file(gsub("small","large",request$image_thumbnail), 'temp.jpg', mode="wb") download.file(gsub("small","large",request$image_thumbnail), 'temp.jpg', mode="wb")
# Post # Post

Binary file not shown.