Reputation: 2710
Is it possible to download a pdf from given url and save it to a server using ColdFusion?
I am looking for a method similar to a file_put_contents()
in php and I couldn't find anything in the Adobe documentation.
Thanks!
Upvotes: 0
Views: 7532
Reputation: 9890
Yes, you can use the cfhttp
tag to download a document from a URL and save it to a file:
Specifically, you'll do something like:
<cfhttp method="get" url="#fileURL#" path="#filePath#" file="#fileName#" />
Upvotes: 12