Comments (11)
Putting it to a vote: 👍 for returning the ID vs a file, 👎 to return the File.
from valkyrie.
Rather than return the full file, what about the file_path
? That would give the option to test for .exist?
or other operations. If something wanted the file they could then use the path to go load it and incur the expense.
from valkyrie.
The File object being returned doesn't mean the content is loaded in. In fact, for most adapters it delegates to an internal IO object which probably hasn't read
anything, yeah?
from valkyrie.
Perhaps there is more than just the file body? Could there be metadata (filename, mime-type) that would get loaded from somewhere?
from valkyrie.
I do wonder if we should standardize on a metadata
attribute on File.
from valkyrie.
I don't think we want to return file_path
because not everything has a path (S3/In-Memory). We could just return the file ID - but returning the File just feels so nice.
from valkyrie.
As long as the File doesn't need to be expensive, I think returning the File is nicer than returning the ID.
from valkyrie.
Vote!
from valkyrie.
Not just for this, I wish there was an :ambivalent: emoji response
from valkyrie.
Not too many votes here, maybe this needs more discussion? I'd rather not be the deciding vote without having a strong preference either way 😄
from valkyrie.
Closing until this shows that returning a File in a specific case would be either too hard to implement or too expensive to be realistic.
from valkyrie.
Related Issues (20)
- Improve Fedora performance using the Fedora 6 simple search API
- Add language to README about branch naming
- Update references of hard-coded legacy master branch name to main branch name
- Valkyrie StorageAdapter Files should have a `#close` method
- Valkyrie StorageAdapter Files shouldn't open a file handle on instantiation
- If enable_extension fails in the first DB migration, it should provide a better error about what to do.
- Storage adapters should have #id_for HOT 2
- Transition Lando to docker-compose for development environment
- Update the gemspec to require MFA for RubyGems releases
- Identify a new Product Owner HOT 5
- Fedora StorageAdapter finds root node for `nil` identifer
- Validate Fedora 6.3 RC1
- Postgres query service should use find_each in #find_all and #find_all_of_model for efficiency HOT 1
- Release v3.0.2 HOT 2
- Support mapping a pre-existing Fedora 6 repository to models.
- Dry::Types::Params::* missing from Valkyrie::Types HOT 1
- Document versioning for StorageAdapters
- Fedora storage adapter expects io to have #length
- Blank values for type Valkyrie::ID cause URI-to-ID lookups to return the Fedora base path as an ID HOT 2
- Valkyrie::StorageAdapter documentation correction? HOT 1
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 valkyrie.