Subiendo api v2

This commit is contained in:
2025-04-16 10:03:13 -03:00
commit 226933fda7
7537 changed files with 576844 additions and 0 deletions

0
deps/mimerl/.fetch vendored Normal file
View File

BIN
deps/mimerl/.hex vendored Normal file

Binary file not shown.

23
deps/mimerl/LICENSE vendored Normal file
View File

@ -0,0 +1,23 @@
2015 (c) Benoit Chesneau <benoc@benoitcnetwork.eu>
2013-2015 (c) Loïc Hoguin <essen@ninenines.eu>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

24
deps/mimerl/README.md vendored Normal file
View File

@ -0,0 +1,24 @@
mimerl
=====
library to handle mimetypes
Present a way to parse IANA mediatype as defined here:
http://www.iana.org/assignments/media-types/media-types.xhtml
Build
-----
$ make
Example of usage:
-----------------
1> mimerl:extension(<<"c">>).
<<"text/x-c">>
2> mimerl:filename(<<"test.cpp">>).
<<"text/x-c">>
3> mimerl:mime_to_exts(<<"text/plain">>).
[<<"txt">>,<<"text">>,<<"conf">>,<<"def">>,<<"list">>,
<<"log">>,<<"in">>]

Binary file not shown.

11
deps/mimerl/hex_metadata.config vendored Normal file
View File

@ -0,0 +1,11 @@
{<<"app">>,<<"mimerl">>}.
{<<"build_tools">>,[<<"rebar3">>]}.
{<<"description">>,<<"Library to handle mimetypes">>}.
{<<"files">>,
[<<"LICENSE">>,<<"README.md">>,<<"rebar.config">>,<<"rebar.lock">>,
<<"src/mimerl.app.src">>,<<"src/mimerl.erl">>,<<"src/mimerl.erl.src">>]}.
{<<"licenses">>,[<<"MIT">>]}.
{<<"links">>,[{<<"Github">>,<<"https://github.com/benoitc/mimerl">>}]}.
{<<"name">>,<<"mimerl">>}.
{<<"requirements">>,[]}.
{<<"version">>,<<"1.3.0">>}.

2
deps/mimerl/rebar.config vendored Normal file
View File

@ -0,0 +1,2 @@
{erl_opts, [debug_info]}.
{deps, []}.

1
deps/mimerl/rebar.lock vendored Normal file
View File

@ -0,0 +1 @@
[].

10
deps/mimerl/src/mimerl.app.src vendored Normal file
View File

@ -0,0 +1,10 @@
{application,mimerl,
[{description,"Library to handle mimetypes"},
{vsn,"1.3.0"},
{registered,[]},
{applications,[kernel,stdlib]},
{env,[]},
{modules,[]},
{maintainers,["Benoit Chesneau"]},
{licenses,["MIT"]},
{links,[{"Github","https://github.com/benoitc/mimerl"}]}]}.

1843
deps/mimerl/src/mimerl.erl vendored Normal file

File diff suppressed because it is too large Load Diff

80
deps/mimerl/src/mimerl.erl.src vendored Normal file
View File

@ -0,0 +1,80 @@
%% -*- erlang -*-
%%%
%%% This file is part of mimerl released under the MIT license.
%%% See the NOTICE for more information.
-module(mimerl).
-export([extension/1]).
-export([web_extension/1]).
-export([filename/1]).
-export([web/1]).
-export([mime_to_exts/1]).
%% @doc Transform an extension to a mimetype
%%
%% Example:
%%
%% ```
%% 1> mimerl:extension(<<"c">>).
%% <<"text/x-c">>
%% '''
-spec extension(binary()) -> binary().
extension(Ext) ->
extensions(Ext).
%% @doc transform a web extension to a mimetype
web_extension(Ext) ->
web_extensions(Ext).
%% @doc Return the mimetype for any file by looking at its extension.
%% Example:
%%
%% ```
%% 1> mimerl:filename(<<"test.cpp">>).
%% <<"text/x-c">>
%% '''
-spec filename(file:filename_all()) -> binary().
filename(Path) ->
case filename:extension(Path) of
<<>> -> <<"application/octet-stream">>;
<< $., Ext/binary >> -> extension(Ext)
end.
web(Path) ->
case filename:extension(Path) of
<<>> -> <<"application/octet-stream">>;
<< $., Ext/binary >> -> web_extension(Ext)
end.
%% @doc Return the list of extensions for a mimetype.
%% Example:
%%
%% ```
%% 1> mimerl:mime_to_exts(<<"text/plain">>).
%% [<<"txt">>,<<"text">>,<<"conf">>,<<"def">>,<<"list">>,<<"log">>,<<"in">>]
%% '''
-spec mime_to_exts(binary()) -> [binary()].
mime_to_exts(Mimetype) ->
mimetypes(Mimetype).
%% GENERATED
web_extensions(<<"css">>) -> {<<"text">>, <<"css">>};
web_extensions(<<"gif">>) -> {<<"image">>, <<"gif">>};
web_extensions(<<"html">>) -> {<<"text">>, <<"html">>};
web_extensions(<<"htm">>) -> {<<"text">>, <<"html">>};
web_extensions(<<"ico">>) -> {<<"image">>, <<"x-icon">>};
web_extensions(<<"jpeg">>) -> {<<"image">>, <<"jpeg">>};
web_extensions(<<"jpg">>) -> {<<"image">>, <<"jpeg">>};
web_extensions(<<"js">>) -> {<<"application">>, <<"javascript">>};
web_extensions(<<"mp3">>) -> {<<"audio">>, <<"mpeg">>};
web_extensions(<<"mp4">>) -> {<<"video">>, <<"mp4">>};
web_extensions(<<"ogg">>) -> {<<"audio">>, <<"ogg">>};
web_extensions(<<"ogv">>) -> {<<"video">>, <<"ogg">>};
web_extensions(<<"png">>) -> {<<"image">>, <<"png">>};
web_extensions(<<"svg">>) -> {<<"image">>, <<"svg+xml">>};
web_extensions(<<"wav">>) -> {<<"audio">>, <<"x-wav">>};
web_extensions(<<"webm">>) -> {<<"video">>, <<"webm">>};
web_extensions(_) -> {<<"application">>, <<"octet-stream">>}.