πŸ’Ž PREMIUM: WordPress/playground tools/pull/ - Uncensored 2025

Skip to content

Conversation

@fluiddot

What?

Drop manually encoding multipart requests. This PR is a follow-up of #203.

Why?

This PR follows this discussion regarding the necessity of manually encoding multipart requests. Additionally, it addresses #259.

How?

  • Remove Express fileUpload middleware to avoid modifying the request object.
  • Remove encodeAsMultipart helper, since we don't need to process them differently (Playground CLI example).

Testing Instructions

  1. Run the command: nvm use && npm install.
  2. Run the command nx preview wp-now start.
  3. Open the WP-admin page (e.g. http://localhost:8881/wp-admin).
  4. Navigate to the Media page.
  5. Upload a media file.
  6. Observe the media has been uploaded correctly to the Media Library.

This was referenced May 13, 2024
@bgrgicak bgrgicak self-requested a review May 14, 2024 06:56
bgrgicak
sejas

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!,
So, the helper library was messing up instead of solving the issue.

Thanks for trying it and creating the PR!

no-library-for-file-uplaod.mp4

I can deploy it tomorrow. I'll probably need some time to improve the GitHub action.

@sejas sejas merged commit cfc8013 into WordPress:trunk May 15, 2024
@fluiddot fluiddot deleted the update/wp-now-simplify-multipart-requests branch May 16, 2024 08:02
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

Successfully merging this pull request may close these issues.

3 participants