We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
hi guys, i send a new file with client.uploadFile but the file of wordpress gallery is empty
Here my code:
const fs = require( "fs" ); const client = wordpress.createClient.... const file = fs.readFileSync(fileLocation); const uploadOptions = { name: fileName, type: 'image/jpeg', bits: file, }; client.uploadFile(uploadOptions, function (error, fileData) { console.log(fileData.attachment_id); //83 console.log(fileData.metadata.file); //undefined console.log(fileData.file); //abvatygaq06.jpg });
Node version: v10.4.0 Node-wordpress: 1.4.1 Wordpress version 4.9.7
The text was updated successfully, but these errors were encountered:
Does this example work for you?
Sorry, something went wrong.
I saw this example but doesn't work
i cant upoad all the images some images, get uploaded quick and smooth but others return no data
No branches or pull requests
hi guys, i send a new file with client.uploadFile but the file of wordpress gallery is empty
Here my code:
The text was updated successfully, but these errors were encountered: