@@ -49,10 +49,6 @@ if Code.ensure_loaded?(Req) do
4949 (default: `"2020-12-06"`)
5050 - `:signed_protocol` - SAS protocol restriction. Defaults to `"https"`, or
5151 `"https,http"` for `http://` endpoints
52- - `:decode_body` - whether `download/2` runs Req's content-type response
53- decoding (JSON → map, CSV → rows, gzip → unzipped, etc.). Defaults to
54- `true` to match Req's own default; pass `false` when you need the raw
55- uploaded bytes.
5652
5753 ## Azure setup
5854
@@ -113,8 +109,7 @@ if Code.ensure_loaded?(Req) do
113109 expires_in: [ type: :integer ] ,
114110 direct_upload_expires_in: [ type: :integer ] ,
115111 service_version: [ type: :string ] ,
116- signed_protocol: [ type: :string ] ,
117- decode_body: [ type: :boolean ]
112+ signed_protocol: [ type: :string ]
118113 ]
119114 end
120115
@@ -153,11 +148,8 @@ if Code.ensure_loaded?(Req) do
153148 def download ( key , % AshStorage.Service.Context { } = ctx ) do
154149 full_key = prefixed_key ( key , ctx )
155150
156- decode_body? = Keyword . get ( ctx . service_opts , :decode_body , true )
157-
158151 with { :ok , url } <- signed_blob_url ( full_key , ctx , permissions: "r" , expires_in: 900 ) ,
159- { :ok , % { status: 200 , body: body } } <-
160- Req . get ( url , headers: base_headers ( ctx ) , decode_body: decode_body? ) ,
152+ { :ok , % { status: 200 , body: body } } <- Req . get ( url , headers: base_headers ( ctx ) ) ,
161153 :ok <- verify_md5 ( body , ctx . expected_md5 ) do
162154 { :ok , body }
163155 else
0 commit comments