Skip to content

Commit 8a58cc7

Browse files
committed
WP-Stateless 3.2.0 doesn’t upload docs, only images #638
1 parent c991b3c commit 8a58cc7

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/classes/class-bootstrap.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,13 @@ private function _init_filters($type = '') {
315315

316316
/**
317317
* Delete original in the end of generating metadata
318+
* it does not work with PDF
318319
*/
319-
add_filter('wp_generate_attachment_metadata', function ($metadata, $attachment_id, $state) {
320-
if (!in_array(ud_get_stateless_media()->get('sm.mode'), array('ephemeral'))) return $metadata;
321-
@unlink(get_attached_file($attachment_id, true));
322-
return $metadata;
323-
}, 99, 3);
320+
// add_filter('wp_generate_attachment_metadata', function ($metadata, $attachment_id, $state) {
321+
// if (!in_array(ud_get_stateless_media()->get('sm.mode'), array('ephemeral'))) return $metadata;
322+
// @unlink(get_attached_file($attachment_id, true));
323+
// return $metadata;
324+
// }, 99, 3);
324325

325326
/**
326327
* Rewrite Image URLS

0 commit comments

Comments
 (0)