ivcu

所属分类:collect
开发工具:Elixir
文件大小:0KB
下载次数:0
上传日期:2022-03-14 15:28:13
上 传 者sh-1993
说明:  图像验证器、转换器和上传器,
(Image Validator, Converter, and Uploader,)

文件列表:
.credo.exs (369, 2022-03-14)
.formatter.exs (145, 2022-03-14)
LICENSE (645, 2022-03-14)
config/ (0, 2022-03-14)
config/config.exs (80, 2022-03-14)
guides/ (0, 2022-03-14)
guides/getting_started.md (2147, 2022-03-14)
guides/using_with_ecto.md (2341, 2022-03-14)
guides/using_with_phoenix.md (1425, 2022-03-14)
lib/ (0, 2022-03-14)
lib/ivcu.ex (3293, 2022-03-14)
lib/ivcu/ (0, 2022-03-14)
lib/ivcu/collection_traverser.ex (1256, 2022-03-14)
lib/ivcu/collection_traverser/ (0, 2022-03-14)
lib/ivcu/collection_traverser/async_traverser.ex (657, 2022-03-14)
lib/ivcu/collection_traverser/sync_traverser.ex (622, 2022-03-14)
lib/ivcu/converter.ex (861, 2022-03-14)
lib/ivcu/converter/ (0, 2022-03-14)
lib/ivcu/converter/cmd.ex (3988, 2022-03-14)
lib/ivcu/definition.ex (2004, 2022-03-14)
lib/ivcu/file.ex (3045, 2022-03-14)
lib/ivcu/storage.ex (646, 2022-03-14)
lib/ivcu/storage/ (0, 2022-03-14)
lib/ivcu/storage/local.ex (2181, 2022-03-14)
mix.exs (1873, 2022-03-14)
mix.lock (3523, 2022-03-14)
test/ (0, 2022-03-14)
test/ivcu/ (0, 2022-03-14)
test/ivcu/collection_traverser/ (0, 2022-03-14)
test/ivcu/collection_traverser/async_traverser_test.exs (651, 2022-03-14)
test/ivcu/collection_traverser/sync_traverser_test.exs (647, 2022-03-14)
test/ivcu/converter/ (0, 2022-03-14)
test/ivcu/converter/cmd_test.exs (2511, 2022-03-14)
test/ivcu/file_test.exs (69, 2022-03-14)
test/ivcu/storage/ (0, 2022-03-14)
test/ivcu/storage/local_test.exs (1700, 2022-03-14)
test/ivcu_test.exs (3929, 2022-03-14)
test/test_helper.exs (15, 2022-03-14)
... ...

# Image Validator, Converter, and Uploader A library to validate, convert, and upload images. ## Why another library? This library serves as a replacement for [waffle](https://github.com/elixir-waffle/waffle) which leaves a lot to be desired. 1. Waffle abuses `__using__` macro where it could use behaviours with defined interfaces. 2. It has too much levels of indirection where it doesn't need to (nested usings for example), making it harder to understend the codebase. 3. The lack or incorrectness of documentation only makes things worse. Still this library mainly uses the same concepts as its predecessor, it just attempts to implement them differently. ## ivcu_ecto when? There is a package named [waffle_ecto](https://github.com/elixir-waffle/waffle_ecto) that attempts to integrate waffle into ecto changesets, which is a bad decision as changesets are supposed to be pure computations without side-effects. When we add effects to them, we only catch strange behaviour. As an example, when we call `Ecto.Changeset.apply_action/2` to do validations, we trigger storing action saving corresponding file when we only needed to cast and validate params. Also, with `waffle_ecto` we tie the process, of saving an image, to a database action and yet don't handle image deletion on an update. Your best bet is to manage the storing [manually](./guides/using_with_ecto.md). ## Installation and Usage See [Getting Started](./guides/getting_started.md) guide. ## Documentation Documentation can be found at [https://hexdocs.pm/ivcu](https://hexdocs.pm/ivcu).

近期下载者

相关文件


收藏者