Skip to content
New issue

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

When using root folder, you need to untrailslash line 178 in b2.php #16

Open
jrhager84 opened this issue Dec 15, 2020 · 0 comments
Open

Comments

@jrhager84
Copy link

When using root folder with b2, there's an additional trailing slash that breaks the links in the media library.
starting at line 171:

return array( 'ID' => $attachment_id, 'filepath' => $filepath, 'filename' => basename( $filepath ), 'url' => wp_get_attachment_url( $attachment_id ), 'subdir' => trim( $uploads['subdir'], DIRECTORY_SEPARATOR ), 'destpath' => $remote_path . untrailingslashit( $uploads['subdir'] ), 'destfile' => $remote_path . untrailingslashit( $uploads['subdir'] ) . basename( $filepath ), // This is the line that went from trail to untrail 'mime_type' => get_post_mime_type( $attachment_id ) );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant