Is local HTTPS?
Nov 21, 2023
9
Level 63
How to copy a file from local to the cloud
Hello,
I have this upload URI given by the Adobe PDF API (I have replaced the token and other data in the URL by fake strings).
I need to upload a file from the local webserver to this address.
How is it possible to do that ?
It's probably very simple, but I really don't get it work.
Thanks for your help.
V
Level 63
@jlrdw It works without HTTPS on the local side.
I just have to send the file inside the body and not attached to the request.
And with AWS presigned URL, it's necessary to send a PUT request and not a POST request. This wasn't mentioned in the documentation.
$response = Http::withBody(
file_get_contents($file_path), 'application/pdf'
)->put($upload_uri);
Please or to participate in this conversation.