gotenberg-php-client
gotenberg-php-client copied to clipboard
how to convert a remote office url file?
Hi!. I have used aws s3 to store uploaded file. There are doc & docx file. I can get url of file from s3. How can i convert file with DocumentFactory? Thanks!
The Document constructor accepts a StreamInterface - so I think you'll need to create a stream for these URLs (eg. Guzzle has an implementation which you might be able to use if you're using the AWS SDK and it's S3 stream wrapper - https://github.com/guzzle/streams/blob/master/src/Stream.php#L45)
Just noticed there's a method in the DocumentFactory called createFromPath that would probably work too - with the AWS stream wrapper.