Last active
September 29, 2015 17:36
-
-
Save jamiejackson/3963d2bf293a46742b18 to your computer and use it in GitHub Desktop.
Throughput Difference in Form File Upload vs. cURL Upload
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1.75 MB/s | |
curl 'https://mysite.com/test/testUpload.cfm?which=fileUploadAll' -F 'filedata=@/cygdrive/e/garbage/GIS Toolkit 2014/GIS Toolkit 2014/CoC_GIS_State_Tool_IN_2014.zip' --compressed --insecure --limit-rate 1000M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- 0.71 MB/s ---> | |
<cfif isdefined("form.fileData")> | |
<cfscript> | |
param name="url.which" default="fileUpload"; | |
destination = expandPath("/mysite_deployment_root/protected/reportmanagement/inbound"); | |
nameConflict = "overwrite"; | |
if ( which == "fileUpload" ) { | |
result = fileUpload( | |
destination=destination, | |
nameConflict=nameConflict | |
); | |
} else { | |
result = fileUploadAll( | |
destination=destination, | |
nameConflict=nameConflict | |
); | |
} | |
</cfscript> | |
<cfoutput>#serializeJSON(result)#</cfoutput> | |
<cfelse> | |
<form name="myUpload" enctype="multipart/form-data"> | |
<cfinput type="file" name="fileData"><br> | |
<cfinput type="submit" name="submit"> | |
</form> | |
</cfif> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why is the transfer rate so different? https://groups.google.com/d/msg/lucee/doo5yazongg/kWXzUK-GDQAJ