-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
Steps to reproduce
// wp-config.php
define('WP_STATELESS_MEDIA_ROOT_DIR', "/uploads");
define('WP_STATELESS_MEDIA_CUSTOM_DOMAIN', "https://example.com");
- Create a post and include a file block
- Upload/select & PDF file to be displayed
- View post
Result
This results in the following HTML block displaying the PDF preview (WP code)
<div
data-wp-interactive="core/file"
class="wp-block-file"
>
<object data-wp-bind--hidden="!state.hasPdfPreview"
class="wp-block-file__embed"
data="https://storage.googleapis.com/redacted-project/uploads/72629795-pdf-test.pdf"
type="application/pdf"
style="width:100%;height:580px">
</object>
.....
</div>
Expected
- The google storage url in the data attribute of the object tagis replaced with https://example.com/uploads/72629795-pdf-test.pdf
Additional information
By looking at the source code it looks like only src and href are replaced data remains untouched.
https://github.com/udx/wp-stateless/blob/latest/lib/classes/class-bootstrap.php#L1064
Metadata
Metadata
Assignees
Labels
No labels