Comments (7)
Here's an implementation that more or less does it.
https://github.com/dblodgett-usgs/hydroRsb/blob/master/R/model_file_download.R
from sbtools.
I assume this applies specifically to item_file_download()
?
from sbtools.
Looking at this - curios in the REST helpers why we only support certain content types? AFAICT sbtools
only downloads the files, and doesn't do anything more than that like try to read the file in, etc, -- So could we just allow any file type, esp. with GET requests?
from sbtools.
yeah, I had the same question here: #98
Supported types vs unsupported types.
from sbtools.
to summarize, i think we decided that we didn't really want to specify which types were permitted, but we needed some way to determine whether we were getting an error or not (e.g., user might not be authenticated). checking for known types was the temporary solution.
@sckott, maybe you've already fixed this today with handle_errors
(i haven't looked very carefully...)? or maybe there's some other way to check for non-authentication & other errors?
from sbtools.
Okay, thanks. Oh, so, if the content-type
header is consistent with an authorization error, then you'd stop on that?
I can write some tests for handle_errors
to make sure (ping #128 )
from sbtools.
Sounds good!
from sbtools.
Related Issues (20)
- Consider `item_facet_download` to support .zip downloads of facet collections? HOT 5
- failing donttest on CRAN
- Minor. "authenticate_sb()" misspelled in error messages
- File upload with checksum validation. HOT 7
- Large file uploads still not as robust as they need to be.
- fix up code.json
- item_upload_cloud can't push data to the public bucket.
- migrate documentation urls and rerelease on CRAN
- Erroneous files when trying to bulk download NLCD files with sbtools in R HOT 3
- Support token based authentication instead of password. HOT 4
- Replacememt for `jossoSessionId` for tokenized downloads? HOT 1
- POSTing a new file fails with token authentication.
- item_rm() needs to remove files on prem an on cloud. HOT 2
- test coverage HOT 2
- `initialize_sciencebase_session()` token copy-paste not working, likely because multi-line JSON token not accepted HOT 3
- `initialize_sciencebase_session()` functions on install from github but not CRAN for release 1.3.0 HOT 3
- Temp `Request failed [400]` message after `sbtools::initialize_sciencebase_session()` (non-blocker) HOT 4
- Show how to edit extended attribtues for sciencebase items with sbtools. HOT 1
- confusing warning when logging in with role accounts HOT 1
- Prevent users from encoding email in `sb_initialize_session()`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sbtools.