https://twill.io logo
Join Discord
Powered by
# ❓questions
  • a

    afatmustafa

    08/31/2021, 7:27 PM
    By the way, I added Turkish language support to Twill.
  • i

    ifox

    08/31/2021, 7:27 PM
    @afatmustafa unfortunately the image field is not compatible with the modal yet
  • i

    ifox

    08/31/2021, 7:27 PM
    that's great!
  • a

    afatmustafa

    08/31/2021, 7:28 PM
    Thanks ifox, okey then I'll go the old way.
  • k

    Klief

    09/01/2021, 9:00 AM
    Is there a way to limit a Twill's project media library, so a malicious person can not rack up my AWS bill 😉
  • k

    Klief

    09/01/2021, 9:00 AM
    Or would the best way to go about that is to use the AWS budgeting tools?
  • i

    ifox

    09/01/2021, 12:32 PM
    @Klief a malicious person with access to the CMS?
  • k

    Klief

    09/01/2021, 12:33 PM
    Indeed, say a hacker got access to the CMS.
  • i

    ifox

    09/01/2021, 12:46 PM
    that would be unfortunate. Twill went through multiple external security audits over the years so you should be realtively safe but you're of course still subject to your users having poor passwords or them sharing their credentials. I'd recommend enabling Twill users 2FA. There are no ways to set limits on the Twill/Laravel side that I can think of right now outside of limiting the max filesize of each uploaded files. I'd recommend setting up CloudWatch alerts on "BucketSizeBytes" if you'd like to be alerted by AWS.
  • u

    user

    09/01/2021, 1:24 PM
    Hey there! I was wondering how do I setup my images in order for them to be served from CDN?
  • p

    pboivin

    09/01/2021, 1:32 PM
    Hey @User, are you considering a specific service (e.g. Amazon S3) or looking for suggestions?
  • u

    user

    09/01/2021, 1:36 PM
    I'm looking for a way to serve stuff directly from CDN instead of it being served locally, because when I 'render' stuff via twill it gets rendered as
    mydomain.com/img/hash/name.jpg
    by default. How do I serve it as
    cdn-mydomain.com/img/hash/name.jpg
    instead? Is there a way for me to tell twill to change the default path before showing the image?
  • i

    ifox

    09/01/2021, 1:43 PM
    @User that's what Imgix is all about. If you're looking to handle that yourself, a custom flysystem disk configuration, or a custom image service class should help you with that
  • p

    pboivin

    09/01/2021, 1:44 PM
    @User out of curiosity, what are you currently using as
    MEDIA_LIBRARY_IMAGE_SERVICE
    ?
  • i

    ifox

    09/01/2021, 1:44 PM
    most likely glide (I see
    img
    in the path shared)
  • u

    user

    09/01/2021, 1:44 PM
    @User
    A17\\Twill\\Services\\MediaLibrary\\Glide
  • i

    ifox

    09/01/2021, 1:45 PM
    twill.glide.base_url
    might work
  • p

    pboivin

    09/01/2021, 1:46 PM
    Nice, so I guess ideally you would want to keep Glide for image transformation but serve the cached/transformed images from the CDN?
  • u

    user

    09/01/2021, 1:46 PM
    Yes
  • i

    ifox

    09/01/2021, 1:48 PM
    Copy code
    GLIDE_BASE_URL=https://cdn-mydomain.com
  • u

    user

    09/01/2021, 1:49 PM
    That's it? I just set it up in my .env?
  • i

    ifox

    09/01/2021, 1:49 PM
    yeah, by default its using your app url
  • i

    ifox

    09/01/2021, 1:49 PM
    if you do this any image url generated by twill should use your CDN domain
  • p

    pboivin

    09/01/2021, 1:52 PM
    I'm having second thoughts... I believe this won't take into consideration the link between the Glide URL and the Glide cached image, or am I missing something obvious?
  • u

    user

    09/01/2021, 1:52 PM
    I was wondering, why does twill generate the default
    /img/
    instead of
    /uploads/
    part of the path? Even though the local path is set to
    /uploads/
    in the config of media-library.php, the
    MEDIA_LIBRARY_LOCAL_PATH
    ?
  • i

    ifox

    09/01/2021, 1:52 PM
    because /img points to a controller where Glide is running the transformations
  • u

    user

    09/01/2021, 1:53 PM
    Furthermore when I try to get images from cdn while using
    /img
    I get redirected back to
    mydomain.com/img/~
    instead of leaving it as
    cdn-mydomain.com/img/~
  • u

    user

    09/01/2021, 1:53 PM
    While when using the
    /uploads/
    instead of
    /img/
    the images get served from cdn
  • i

    ifox

    09/01/2021, 1:53 PM
    that's Laravel redirecting you
  • i

    ifox

    09/01/2021, 1:54 PM
    when you point to uploads your get a static file from public folder
1...828384...484Latest