Comments (4)
I have a couple of ideas for this:
- We could store a lot of "common" metadata in this fashion, for example size and last modified date. I'd also like to see dimensions for images too. If we wanted to be clever, we could even leverage this library to provide support for durations for audio and video files, and resolutions for videos. The upshot of this is that we would no longer need to make any filesystem calls for these values, which should considerably increase performance especially with remote filesystems.
- We could have metadata scanned, retrieved and stored on upload, deletion or move through the normal media manager functions, so the only place we'd fall out of sync is if people make changes to the filesystem directly. To help with this, perhaps an Artisan command could be created to re-scan all metadata.
- Further to the above, we could generate thumbnails for the images at the same point in time, as opposed to having them generated on-the-fly as it does currently.
- Ideally, I would like to store the entire media structure in the database and rely on the database being the single source of truth for media. By using the database, we have full control over the delivery, sorting and filtering of media items, which again should increase performance.
- By having the metadata in the database, extensibility potential would be increased, as mentioned in the OP.
from winter.
Fair enough re: having the functionality as a plugin. That would probably work better for the company's interests anyways as the feature is a selling point with the existing product.
from winter.
@bennothommo further thoughts from @jaxwilko and myself regarding the potential for a "version replacement / management system" for individual files.
We could provide the ability to upload new versions of a given file which must match the filetype of the current file, when a file is replaced with a new version; it is replaced in place on disk and the metadata remains the same; the original file is them moved to a .version-history/123/456/789/hash_of_original.ext
folder structure at the root level and that path or hash or identifier is stored on the replacing file's metadata regarding the version history along with other information such as when the swap occurred, ability for custom metadata on the version history, user that made the swap, etc.
Any thoughts on the above?
from winter.
It's a cool idea, but I think it might be better as a plugin.
I would assume it would only be able to version track files managed through the manager, and so wouldn't cover cases of people manipulating the files directly or through another plugin. It would also have storage implications and require people to keep on top of cleaning out old versions if they're on space-restricted setups, or perhaps using external hosting where storage = money.
from winter.
Related Issues (20)
- Fontawesome 6.1.1 to 6.5.1 for remove Font console error HOT 2
- Updating a plugin via command-line error. HOT 2
- Adding event context to EventLog service provider HOT 2
- Broken default email layout after upgrading to Twig 3.9.1 HOT 2
- Translate parameters - urlFromPattern bug HOT 1
- Interoperability issue with 500 response code caused by ApplicationException HOT 3
- Winter\Storm\Database\Relations\BelongsToMany::shouldSelect(): Argument #1 ($columns) must be of type array, int given HOT 2
- Image not upload HOT 6
- imageWidth/imageHeight filters not available on cold cache HOT 1
- HTTP Testing of Plugin not possible HOT 4
- error 500 after update from 1.2.5 to 1.2.6 HOT 6
- Correction for undefined variable $record in modules\system\behaviors\SettingsModel.php line 140 HOT 3
- Migrations Problem
- Hash property is not removed from URL after dismissing a relation modal with tabs HOT 11
- Add "New Item" shortcut menu HOT 1
- Inconsistent behavior between model.relation.afterAttach and model.relation.afterDetach HOT 4
- Failed to configure list setup in preview page HOT 4
- model.relation.beforeAdd and model.relation.afterAdd events not called when using AttachOneOrMany::create()
- Multiple default filters interfere with each other HOT 5
- php fatal erorr HOT 4
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 winter.