-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
elixirPull requests that update Elixir codePull requests that update Elixir codeenhancementNew feature or enhancement of existing functionalityNew feature or enhancement of existing functionalitytechnicalA technical issue that requires understanding of the code, infrastructure or dependenciesA technical issue that requires understanding of the code, infrastructure or dependencies
Description
I added today the following functionality to my toy fork: if a picture is served, you pass a GET request to the endpoint with the URL in the query string and get back a link to a resized WEBP picture from S3. I found some pictures that were served and wanted to use them.
I choose WEBP format to limit traffic on S3 and bandwidth usage on mobile (and canIUse is :ok).
To run in a Livebook:
map= %{url: <the url.png>, w: 900, h: 600})
URI.parse("https://up-image.fly.dev/api")
|> URI.append_query(URI.encode(map)
|> URI.to_string()
|> Finch.get()
|> Finch.build(MyApp.Finch)
or
curl -X GET https://up-image.fly.dev/api?url=<the url.jpeg>&h=600&w=600It will deliver a json reply with the URL of the new file in S3.
Let me know if you find some interest.
Endpoint: (normally works 😀) https://up-image.fly.dev/api
nelsonicnelsonic and LuchoTurtle
Metadata
Metadata
Assignees
Labels
elixirPull requests that update Elixir codePull requests that update Elixir codeenhancementNew feature or enhancement of existing functionalityNew feature or enhancement of existing functionalitytechnicalA technical issue that requires understanding of the code, infrastructure or dependenciesA technical issue that requires understanding of the code, infrastructure or dependencies