Comments (8)
So creating a new controller would present a bunch of work, because of the caching aspect (thumbnails are saved to filesystem).
I think we could handle the change in the same controller there would just be some edge cases.
Say you had: files://files/foo/bar.jpg
that being a files
folder instead the files
folder/filesystem. It would previously generate a route like this: /thumbs/5x5c/files/foo/bar.jpg
. If that was used on the controller (with my change), it would be parsed as files://foo/bar.jpg
, missing the inner files
folder. As long as all cache is invalidated, including cache gateways, then the route would be regenerated like this: /thumbs/5x5c/files/files/foo/bar.jpg
which would be parsed correctly.
I think this edge case is small enough that it probably won't be a problem. As long as cache is invalidated, so the thumb routes are regenerated correctly.
from thumbs.
We could also do another controller prefix.
More work, but wouldn't that be a clearer way forward?
from thumbs.
More work, but wouldn't that be a clearer way forward?
Probably. But it means duplicating the controller and we have a filesystem problem too. If saving thumbnails to disk is enabled then there are two folders...I guess that's not terrible though.
Definitely pays off in the long run not having to guess which filesystem to use.
from thumbs.
Could we have the old controller extend the new controller and call parent functions with a corrected path, or am I miss understanding the problem? (It's Monday after all)
from thumbs.
Works for me.
from thumbs.
K I'll work on PR at some point soon.
from thumbs.
Ok I lied I can't do it in same controller without breaking BC.
Everyone ok if I do a major version for this change?
from thumbs.
Modified approach approved at dev-meeting.
@CarsonF PR away 👍
from thumbs.
Related Issues (15)
- urldecode HOT 1
- $app->pass() does not exist HOT 1
- [RFC] Add support for retina images. HOT 1
- Passthrough when file is SVG
- bolt thumbnail setting to save files (static) is ignored HOT 1
- Non existing method pass() in 2.x provider HOT 2
- [RFC] Allow Quality and Crop Direction to be configurable HOT 8
- Thumbnails Error when running inside Docker container HOT 7
- Throw exception if GD isn't installed correctly HOT 2
- [3.3] "not found" image throws an exception HOT 6
- Tests on `master` are broken. HOT 3
- ThumbnailResponderTest incompatible with PHP 5.3 HOT 1
- Custom thumbnail paths HOT 5
- Preserve gif animation when creating thumbs HOT 2
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 thumbs.