After some further experimenting and talking to a colleague, we found the answer (team effort!) altering how the file handler deals with the file content.
// Assign values required
$wx_fileName = $_FILES['file']['name'][$i];
$wx_fileMime = $_FILES['file']['type'][$i];
$wx_fileSize = $_FILES['file']['size'][$i];
$wx_tmpf = $_FILES['file']['tmp_name'][$i];
//$wx_file = fopen($_FILES['file']['tmp_name'][$i], "rb");
$wx_file = base64_encode(file_get_contents($_FILES['file']['tmp_name'][$i]));
Basically replacing fopen() with file_get_contents() and base64 encoding the stream. This worked (finally, yay!)
Related Posts:
- Deleting images through upload folder, but not deleting from media library
- Media Upload Tab reload and change $_GET
- Redirect to another page using contact form 7? [closed]
- Is there a function to list all uploaded images? How can I add one?
- File Uploader – Upload without adding to Media Library
- the content of the uploads folder gets deleted periodically, how to figure out what causes it?
- 500 Internal server error wp_handle_upload_prefilter
- Move plugin upload folder from mywebsite.com/wp-content/uploads/pdfuploads to mywebsite.com/pdfs?
- Soflyy WP All Import Custom File Download Issue
- How to create a dashboard for logged-in users with custom functionality? [closed]
- How to rename files during upload to a random string?
- wp_handle_upload – specified file failed upload test
- I want to allow certain file types on dokan upload files
- stop resize button for wordpress media
- How can I see all the actions attached to an “add_action” hook?
- How can I import a class privately into a plugin?
- Problems with autoloading classes via sp_autoload_register / maybe interfering WP-specific autoloader
- Can we completely remove the WordPress Sitemaps (WordPress 5.5)?
- how does wp.media javascript library work?
- Updating WooCommerce variable product stock issue
- Please select a file error
- Rename existing old uploaded images containing accented French characters (not during upload)
- White text on white background in TinyMCE when wp_editor is called in WP 3.9
- How to upload thousands of images?
- Is it possible to filter the wp_footer() scripts, read the content, and insert them inline?
- Loading class files via autoload method
- Adding a custom line of text to php code
- plugins_url() incorrectly returns a url with www subdomain
- Modifying Footnote Plugin for Descriptive Title Attributes
- I would like to use create a function in my custom plugin to tell WP to use a different header
- Getting media library popup in custom plugin admin page
- Is it possible to personalize the Media Library?
- Escape when echoed
- add_meta_box (Will display only in specific page admin WordPress)
- How to write one comment and publish on every post using database or plugin?
- Make id column as AUTO INCREMENT on plugin activation
- Redirecting to home page after login as custom role WordPress
- Notepad sticky plugin
- WooCommerce Custom Product to checkout
- How to stop or remove an action being called inside a function of an extended class
- How to simultaneously access the same MySQL database in the main column and sidebar of WordPress?
- Date calculations from 2 custom fields
- Easiest way to add dropdown to a page
- Assign / update custom field value for all posts (How can I assign only to posts without custom field value?)
- How to enable specific plugin only based around shop manager role?
- Adding a new field to the address field type in gravity forms
- Show admin notice on incorrect value on form field
- Removing included CSS file that doesn’t exist
- WordPress adding a menu page when activating a plugin
- Create a plugin from within WordPress
- Class variables not correct on page
- Call plugin with php function
- What happens when WordPress memory limit is exceeded?
- Use wp_upload_dir() correctly
- adding a button to the media uploader
- Allowing .rfa Files In Media Upload [duplicate]
- How do I add $_SESSION[”] to my wordpress page?
- output html on post or page from custom plugin [closed]
- WordPress: Add custom add_filter for custom functions
- How to use custom Javascript code inside a plugin?
- How to use printf to output two links?
- speed up pagination for huge database
- 2 wordpress site same database
- How to redirect to a page after the form is submitted
- WP Insert Post If user refreshes override new post
- Simple sildeshow/image-upload plugin?
- Code for unique user visit count on every page WordPress
- How to makes changes on the shop/category/tag pages but not on the product pages in woocommerce?
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- Redirect to a page while maintaining search query parameters without causing an infinite loop
- Getting Fatal error: Uncaught Error: Call to undefined function plugin_dir_path() when linking to another file within my wordpress plugin
- front end editor creation for Restropress plug in – displaying information from a WP admin area, on a different URL
- Custom Field used to allow a Free Story; no longer works
- How to send new visitor to a splash page for only one time in wordpress?
- Cannot display wordpress thumbnail
- Cron job shedules replace?
- Create a form and have custom menu display based on user answers?
- upload multiple images using wp_handle_upload
- Can i add custom code in Source in specific page, Header from function.php?
- Problem with conditional woocommerce custom checkout field
- GET web api method from a WordPress PHP script
- Adding link on title its in description but not in title see screenshots attached
- Editing Global Variables from Inside Functions
- Posting code inside the post instead of in the template file using shortcode
- Can anyone tell me why I can’t edit a plugin when it is installed without having to re-install?
- conditional tags for the output of a plugin
- Can’t insert files in other inputs
- How to tweak a plugin without preventing it from updating
- Place max_execution_time in plugin [closed]
- Is there a WP-Plugin to convert PNG to GIF? [closed]
- Creating a press page for our project
- wordpress illegal string offset ‘parameter’ error
- Function not being called on form submit, only blank admin-post.php page
- how to get the url of a custom uploaded file
- cURL External API request displays content above other content on page
- A way to upload old html pages with all its assets via WordPress admin and to add a fixed menu on top of those (a la Wayback Machine)
- WordPress Convert queries to slashes using function.php
- Getting table to format properly in RSS feed emails
- Getting table to format properly in RSS feed emails
- PHP Deprecated function Optional parameter $function