Copy link to clipboard
hi guys, im working on a project which send a file to client side through api. i use the PUT method to send the file but getting 400 bad request. after checking the log, found that all my file content has been endoded. but when i download the file, its content still look ok.
may i know how to send the file and make sure the file content is decoded? Below is part of my code.
<cfhttp url="#requestUrl#" method="PUT" result="res" throwonerror="yes"> <cfhttpparam name="Authorization" type="header" value="Basic #token#"> <cfhttpparam name="Content-Type" type="header" value="multipart/form-data"> <cfhttpparam type="file" name="document" file="#filename#" > </cfhttp>
Have something to add?