true
end, Opts),
{{mod_http_api, Opts1}, Acc};
+transform_module(_Host, mod_http_upload, Opts, Acc) ->
+ Opts1 = lists:filter(
+ fun({service_url, _}) ->
+ warn_deprecated_option(service_url, external_secret),
+ true;
+ (_) ->
+ true
+ end, Opts),
+ {{mod_http_upload, Opts1}, Acc};
transform_module(_Host, Mod, Opts, Acc) ->
{{Mod, Opts}, Acc}.
mod_opt_type(get_url) ->
econf:url();
mod_opt_type(service_url) ->
- econf:and_then(
- econf:url(),
- fun(URL) ->
- ?WARNING_MSG("Option 'service_url' is deprecated, consider using "
- "the 'external_secret' interface instead", []),
- URL
- end);
+ econf:url();
mod_opt_type(custom_headers) ->
econf:map(econf:binary(), econf:binary());
mod_opt_type(rm_on_unregister) ->
mod_opt_type(hosts) ->
econf:well_known(hosts, ?MODULE).
--spec mod_options(binary()) -> [{service_url, binary()} |
- {thumbnail, boolean()} |
+-spec mod_options(binary()) -> [{thumbnail, boolean()} |
{atom(), any()}].
mod_options(Host) ->
[{host, <<"upload.", Host/binary>>},
secret_length(Host) ->
gen_mod:get_module_opt(Host, mod_http_upload, secret_length).
--spec service_url(gen_mod:opts() | global | binary()) -> binary().
+-spec service_url(gen_mod:opts() | global | binary()) -> 'undefined' | binary().
service_url(Opts) when is_map(Opts) ->
gen_mod:get_opt(service_url, Opts);
service_url(Host) ->