Janusz Chudzynski
Janusz Chudzynski

Reputation: 2710

Downloading file from url ColdFusion

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

Answers (1)

Michael C. O'Connor
Michael C. O'Connor

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

Related Questions