add Content-Length header when doing uploads
This commit is contained in:
parent
38e79749a8
commit
26620cf36b
|
@ -774,6 +774,7 @@ MEDIA-TYPE is one of (:image :video :audio :document)."
|
||||||
(multiple-value-bind (body status-code)
|
(multiple-value-bind (body status-code)
|
||||||
(drakma:http-request put-url
|
(drakma:http-request put-url
|
||||||
:additional-headers headers
|
:additional-headers headers
|
||||||
|
:content-length (file-length file-data)
|
||||||
:content-type mime-type
|
:content-type mime-type
|
||||||
:method :put
|
:method :put
|
||||||
:content decrypted-file)
|
:content decrypted-file)
|
||||||
|
@ -805,6 +806,7 @@ MEDIA-TYPE is one of (:image :video :audio :document)."
|
||||||
(drakma:http-request put-url
|
(drakma:http-request put-url
|
||||||
:additional-headers headers
|
:additional-headers headers
|
||||||
:content-type "image/png"
|
:content-type "image/png"
|
||||||
|
:content-length (file-length stream)
|
||||||
:method :put
|
:method :put
|
||||||
:content path)
|
:content path)
|
||||||
(unless (and (>= status-code 200) (< status-code 300))
|
(unless (and (>= status-code 200) (< status-code 300))
|
||||||
|
|
Loading…
Reference in a new issue