1

I'm trying to move a file from one API (call it "API-A") and cURL POST it to another API (call it "API-B").

API-A gives me the file as a base64 encoded string.

Right now, I can convert the string, save it as a file, post it, then delete it on my end.

This works, but it feels inefficient. Is there any to take the base64 string I got from API-A, convert it to a blob or something, then POST it as a file?

Thanks!

JWally
  • 582
  • 11
  • 18
  • 1
    Possible duplicate of [POST a file string using cURL in PHP?](http://stackoverflow.com/questions/3085990/post-a-file-string-using-curl-in-php) – Bytewave Mar 17 '17 at 04:09

1 Answers1

0

Looks like the question was already answered here:

POST a file string using cURL in PHP?

I got hung up on the file-encoding portion. Good catch by Bytewave.

Community
  • 1
  • 1
JWally
  • 582
  • 11
  • 18