From 4fce76e067206a95cc198999d41b44d92b88af6f Mon Sep 17 00:00:00 2001 From: Vincent Balat Date: Tue, 14 Sep 2021 15:10:32 +0200 Subject: [PATCH 1/2] [Eliom_request_info] Restore functions to access uploaded file info --- src/lib/eliom_request_info.server.ml | 3 +++ src/lib/eliom_request_info.server.mli | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/lib/eliom_request_info.server.ml b/src/lib/eliom_request_info.server.ml index ee73b83e03..2963c12702 100644 --- a/src/lib/eliom_request_info.server.ml +++ b/src/lib/eliom_request_info.server.ml @@ -331,6 +331,9 @@ let get_ri () = get_ri_sp sp let get_tmp_filename fi = fi.Ocsigen_extensions.tmp_filename +let get_filesize fi = fi.Ocsigen_extensions.filesize +let get_original_filename fi = fi.Ocsigen_extensions.raw_original_filename +let get_file_content_type fi = fi.file_content_type let get_sitedata () = find_sitedata "get_sitedata" diff --git a/src/lib/eliom_request_info.server.mli b/src/lib/eliom_request_info.server.mli index a1465cab9a..08d2e5a37a 100644 --- a/src/lib/eliom_request_info.server.mli +++ b/src/lib/eliom_request_info.server.mli @@ -127,6 +127,18 @@ val get_previous_extension_error_code : unit -> int (** returns the filename used by Ocsigen for the uploaded file. *) val get_tmp_filename : Ocsigen_extensions.file_info -> string +(** returns the size of the uploaded file. *) +val get_filesize : Ocsigen_extensions.file_info -> int64 + +(** returns the name the file had on the client when it has been sent. *) +val get_original_filename : Ocsigen_extensions.file_info -> string + +(** returns the content type sent by the browser with the file + (if any). *) +val get_file_content_type : + Ocsigen_extensions.file_info -> ((string * string) * (string * string) list) option + + (** returns the root of the site. *) val get_site_dir : unit -> Eliom_lib.Url.path From 788a38da0c4aa32e0135ed42582762f770a57e13 Mon Sep 17 00:00:00 2001 From: Vincent Balat Date: Tue, 14 Sep 2021 16:04:13 +0200 Subject: [PATCH 2/2] 8.8.0 --- opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opam b/opam index babe70d4fb..0b6995c6e0 100644 --- a/opam +++ b/opam @@ -1,6 +1,6 @@ opam-version: "2.0" name: "eliom" -version: "8.7.0" +version: "8.8.0" maintainer: "dev@ocsigen.org" authors: "dev@ocsigen.org" synopsis: "Client/server Web framework"