Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Martin Samson
    @masom
    @Bladrak good idea on the API to do check_image before saving the key.
    Hugo Briand
    @Bladrak
    thanks :) I think I have to update it a bit though, maybe clear the response after checking the response code
    Martin Samson
    @masom
    Yeah we'll also have to come up with a way to authenticate endpoints
    maybe a new project for that
    tc_auth or something like that
    That way we can have a shared project to handle authentication on endpoints
    Hugo Briand
    @Bladrak
    Maybe the auth should rather be handled by the front web server?
    Hugo Briand
    @Bladrak
    @masom do you think we could issue a 0.2 version for both shortener & core on pypi ?
    I think most of the technical work is done, we mostly need tests right now, which doesn't prevent releasing a beta version :)
    Martin Samson
    @masom
    Yep. Before doing that is check_image preventing invalid requests from being shortened? Like an invalid signature?
    Hugo Briand
    @Bladrak
    Yes
    All checks are done within check_image, the only thing done in execute_image_operations is the output of the image
    Martin Samson
    @masom
    Yeah that PR is great. I was thinking of that last night. Generating the entire image when storing the shortened url would slow down some scenarios.
    I'm just going to make sure everything works before releasing 0.2
    Hugo Briand
    @Bladrak
    Sure, I still have some additions to make on my side (I'm currently writing a new generator, based on shortuuid lib, and adding an option to preserve the image name in the shortened URL)
    Martin Samson
    @masom
    :smile:
    Yeah the original image name was a little bit weird
    I quickly hacked a header in the response to allow saving the file using the original file but it's far from ideal
    Hugo Briand
    @Bladrak
    Yep, still needed though :)
    I think I may have some trouble shortening the URL if it's encoded
    Martin Samson
    @masom
    hum?
    Hugo Briand
    @Bladrak
    I'm shortening the URL whether it's encrypted or not
    But if it's encrypted, I may not have the image name
    Martin Samson
    @masom
    Ah yeah. Encrypted urls are kinda problematic. There's a bunch of "deprecated" functions that are still in thumbor to maintain them.
    With url shortening it's probably easier to not even encrypt the url as the end-users would never see the content.
    Hugo Briand
    @Bladrak
    I just realized that even hashed URLs have the image name within, so it shouldn't be problematic after all :)
    Martin Samson
    @masom
    @Bladrak shortener + core working. I'll start updating files as 0.2 and wait for your generator to push.
    Hugo Briand
    @Bladrak
    Here it is : thumbor-community/shortener#11
    Martin Samson
    @masom
    Looks good.
    Hugo Briand
    @Bladrak
    Thanks for the merge :)
    Martin Samson
    @masom
    core + shortener updated to 0.2
    Hugo Briand
    @Bladrak
    Great, thanks :)
    Hugo Briand
    @Bladrak
    I'll try to work on the tests tomorrow, unless you see any improvement to work on?
    Martin Samson
    @masom
    Tests would be awesome. At some point we should probably add statsd metrics to the shortener.
    Hugo Briand
    @Bladrak
    Yes probably
    Martin Samson
    @masom
    @Bladrak another cool part with check_image is it somewhat implements the default thumbor security model. Only valid signed ( or if unsafe is allowed ) image generate a key
    Hugo Briand
    @Bladrak
    Yes :) We ensure the URL will return an image
    Martin Samson
    @masom
    @Bladrak Updated to 0.2.1 with your PR
    Hugo Briand
    @Bladrak
    Thanks a lot @masom
    Yahya Saddiq
    @ysadiq
    Hi Guys, i'm running Thmbor 4.6.8 on centOS. i can't find both logging files stdout neither stderror in /var/log/ .
    if logging is disabled how can enable it?
    Martin Samson
    @masom

    Hi @ysadiq , shortener will only work on Thumbor 5.x due to a change in how asynchronous actions are executed ( using tornado generators ).

    For generic logging you can pass a -l <level> option to the thumbor command line. ex: thumbor -c /etc/thumbor.conf -l debug

    Hugo Briand
    @Bladrak
    Hello @masom ; I fixed a missing dependency (redis) in the setup.py file (see commit 6844871); would you mind issuing version 0.2.2?
    Martin Samson
    @masom
    @Bladrak shouldn't shortuuid also be in requirements.txt ?
    Added the deps in there
    @Bladrak pushed
    Hugo Briand
    @Bladrak
    thanks @masom :)
    Hugo Briand
    @Bladrak
    @masom it seems there's an issue when installing tc_shortener from pip; it installs version 0.2.1 :/ however it seems correctly registered on the website (https://pypi.python.org/pypi/tc_shortener) ; do you have any idea?
    Martin Samson
    @masom
    Pip might be caching
    @Bladrak i just re-pushed in case it's pypi but I was able to install 0.2.2 by disabling my local cache