Git Product home page Git Product logo

Comments (8)

CarsonF avatar CarsonF commented on July 22, 2024 1

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.

GwendolenLynch avatar GwendolenLynch commented on July 22, 2024

We could also do another controller prefix.

More work, but wouldn't that be a clearer way forward?

from thumbs.

CarsonF avatar CarsonF commented on July 22, 2024

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.

GwendolenLynch avatar GwendolenLynch commented on July 22, 2024

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.

GwendolenLynch avatar GwendolenLynch commented on July 22, 2024

Works for me.

from thumbs.

CarsonF avatar CarsonF commented on July 22, 2024

K I'll work on PR at some point soon.

from thumbs.

CarsonF avatar CarsonF commented on July 22, 2024

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.

GwendolenLynch avatar GwendolenLynch commented on July 22, 2024

Modified approach approved at dev-meeting.

@CarsonF PR away 👍

from thumbs.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.