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
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
Steps to reproduce
// wp-config.php
define('WP_STATELESS_MEDIA_ROOT_DIR', "/uploads");
define('WP_STATELESS_MEDIA_CUSTOM_DOMAIN', "https://example.com");
Result
This results in the following HTML block displaying the PDF preview (WP code)
Expected
Additional information
By looking at the source code it looks like only
srcandhrefare replaced data remains untouched.https://github.com/udx/wp-stateless/blob/latest/lib/classes/class-bootstrap.php#L1064