From 08f7291a24aac43dc239c97b8892bbf2bbe87f4d Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 26 Oct 2015 22:30:58 +0100 Subject: [PATCH] mod_http_upload: Add/fix function specifications --- mod_http_upload/src/mod_http_upload.erl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mod_http_upload/src/mod_http_upload.erl b/mod_http_upload/src/mod_http_upload.erl index fd7294c..c29bf53 100644 --- a/mod_http_upload/src/mod_http_upload.erl +++ b/mod_http_upload/src/mod_http_upload.erl @@ -721,6 +721,12 @@ iq_disco_info(Lang, Name) -> %% HTTP request handling. +-spec store_file(file:filename_all(), binary(), + integer() | undefined, + integer() | undefined, + binary(), binary(), boolean()) + -> ok | {ok, [{binary(), binary()}], binary()} | {error, term()}. + store_file(Path, Data, FileMode, DirMode, GetPrefix, LocalPath, Thumbnail) -> case do_store_file(Path, Data, FileMode, DirMode) of ok when Thumbnail -> @@ -749,7 +755,9 @@ store_file(Path, Data, FileMode, DirMode, GetPrefix, LocalPath, Thumbnail) -> Err end. --spec do_store_file(file:filename_all(), binary(), integer(), integer()) +-spec do_store_file(file:filename_all(), binary(), + integer() | undefined, + integer() | undefined) -> ok | {error, term()}. do_store_file(Path, Data, FileMode, DirMode) ->