We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to create a word document using data from the Trello API.
The API can provide a partial URL for an avatar image. The full image URL can be derived from this by adding on details of the image size.
So the API provides something like this
"avatarUrl": "https://trello-members.s3.amazonaws.com/6059dd69783e1b38da09a50c/acdc216e9c555d2f9a9a5aaf6183775f"
and the full URL is
"https://trello-members.s3.amazonaws.com/6059dd69783e1b38da09a50c/acdc216e9c555d2f9a9a5aaf6183775f/50.png".
Whenever i try to use the object value to derive the image URL and use this in an addImage call I get a 500 error.
I my addImage call is in a foreach loop where I iterate through card members.
foreach ($members as $member) { $imageStyle = array( 'width' => 40, 'height' => 40, 'wrappingStyle' => 'square', 'positioning' => 'absolute', 'posHorizontalRel' => 'margin', 'posVerticalRel' => 'line', ); $section->addImage($member->avatarUrl . "/50.png", $imageStyle); }
PHPWord recognises the image URL and adds image to document
500 Internal Server Error
Please fill in your environment information:
The text was updated successfully, but these errors were encountered:
#0 /public_html/acq-trello/vendor/phpoffice/phpword/src/PhpWord/Element/Image.php(149): PhpOffice\PhpWord\Element\Image->checkImage() #1 [internal function]: PhpOffice\PhpWord\Element\Image->__construct('https://cslitto...') #2 /public_html/acq-trello/vendor/phpoffice/phpword/src/PhpWord/Element/AbstractContainer.php(146): ReflectionClass->newInstanceArgs(Array) #3 [internal function]: PhpOffice\PhpWord\Element\AbstractContainer->addElement('Image', 'https://cslitto...') #4/public_html/acq-trello/vendor/phpoffice/phpword/src/PhpWord/Element/AbstractContainer.php(113): call_user_func_array(Array, Array) #5 /public_html/acq-trello/functions.php(190): PhpOffice\P in /public_html/acq-trello/vendor/phpoffice/phpword/src/PhpWord/Element/Image.php on line 418
Sorry, something went wrong.
No branches or pull requests
Describe the Bug
I am trying to create a word document using data from the Trello API.
The API can provide a partial URL for an avatar image. The full image URL can be derived from this by adding on details of the image size.
So the API provides something like this
"avatarUrl": "https://trello-members.s3.amazonaws.com/6059dd69783e1b38da09a50c/acdc216e9c555d2f9a9a5aaf6183775f"
and the full URL is
"https://trello-members.s3.amazonaws.com/6059dd69783e1b38da09a50c/acdc216e9c555d2f9a9a5aaf6183775f/50.png".
Whenever i try to use the object value to derive the image URL and use this in an addImage call I get a 500 error.
Steps to Reproduce
I my addImage call is in a foreach loop where I iterate through card members.
Expected Behavior
PHPWord recognises the image URL and adds image to document
Current Behavior
500 Internal Server Error
Context
Please fill in your environment information:
The text was updated successfully, but these errors were encountered: