recruitee / bow Goto Github PK
View Code? Open in Web Editor NEWFile uploads for Elixir (with Ecto support)
License: MIT License
File uploads for Elixir (with Ecto support)
License: MIT License
I am trying to get bow from hex.pm, but it says it does not recognize the package.
Could you let me know how to write the code to get it directly from github.
Thanks.
Could you please add a sentence to your Readme.md, (or send me a a reply) about why someone might want to choose Bow over Arc, or vice versa?
Thanks.
This code
def transform(source, target, :thumb) do
Bow.Exec.exec source, target,
"convert ${input} -strip -gravity Center -resize 250x175^ -extent 250x175 ${output}"
end
produces this error
{:error,
%{
original: :ok,
thumb: {:error,
%Protocol.UndefinedError{
description: "",
protocol: Enumerable,
value: "convert ${input} -strip -gravity Center -resize 250x175^ -extent 250x175 ${output}"
}}
}}
I think is this part about put info about input and output of command
https://github.com/Recruitee/bow/blob/master/lib/bow/exec.ex#L43-L45
cmd =
command
|> Enum.map(fn
If I try
command = "convert ${input} -strip -gravity Center -resize 250x175^ -extent 250x175 ${output}"
cmd = command |> Enum.map(fn x -> x end)
return
** (Protocol.UndefinedError) protocol Enumerable not implemented for "convert ${input} -strip -gravity Center -resize 250x175^ -extent 250x175 ${output}" of type BitString. This protocol is implemented for the following type(s): Ecto.Adapters.SQL.Stream, Postgrex.Stream, DBConnection.Stream, DBConnection.PrepareStream, HashSet, Range, Map, Function, List, Stream, Date.Range, HashDict, GenEvent.Stream, MapSet, File.Stream, IO.Stream
(elixir 1.10.1) lib/enum.ex:1: Enumerable.impl_for!/1
(elixir 1.10.1) lib/enum.ex:141: Enumerable.reduce/3
(elixir 1.10.1) lib/enum.ex:3383: Enum.map/2
I think the purpose of this code snippet is to have the final command to process the conversion, so I tried to map the input and output to put the information, but I was not successful ๐
Some hopefully helpful eedback:
def changeset(photo \ %MODULE{}, params) do
photo
|> cast(params, [:photo, :sort_order, :alt_tag, :title, :description, :publish])
|> Bow.Ecto.cast_uploads(params, [:photo])
|> Bow.Ecto.validate([:photo])
end
It doesn't recognize Bow.Ecto. I tried
use Bow.Ecto
and
use Bow.Ecto.Schema
I would say this plugin is not adequately documented. If there is a fully working example with Phoenix 1.3, that would be very helpful. Let me know how I can help on that front.
I think it would be awesome to have something as smooth and well documented as Carrierwave in Elixir.
Best documentation is very explicit, nothing implicit for an easier onboarding path for Elixir noobs. Having looked at the code, it does look quite a bit more concise than Arc :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.