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!

0

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.