We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
knitr::imgur_upload()
so that packages using imgur_upload() don't have to depend on knitr.
imgur_upload()
The dependency on the R package curl could also be removed if the command curl exists.
curl
BTW, imgur.com is blocked in certain countries. I'm not sure if there are other similar image hosting services. The one below doesn't really work:
https://freeimage.host/page/api
upload_freeimage = function(file, curl = Sys.which('curl')) { api = 'https://freeimage.host/api/1/upload/' key = '6d207e02198a847aa98d0a2a901485a5' # use the curl package if the curl command is not found if (curl == '') { h = curl::new_handle() curl::handle_setopt(h, customrequest = 'POST') curl::handle_setform(h, key = key, source = curl::form_file(file)) res = rawToChar(curl::curl_fetch_memory(api, h)$content) return(res) } system2(c('curl', shQuote(c( '--form', paste0('key=', key), '--form', paste0('source=@', file), api )))) }
The text was updated successfully, but these errors were encountered:
95158cc
xfun::upload_imgur()
No branches or pull requests
so that packages using
imgur_upload()
don't have to depend on knitr.The dependency on the R package curl could also be removed if the command
curl
exists.BTW, imgur.com is blocked in certain countries. I'm not sure if there are other similar image hosting services. The one below doesn't really work:
https://freeimage.host/page/api
The text was updated successfully, but these errors were encountered: