• Hi, I am trying to get the wordpress API to work through the retool application, however when I try to upload a photo I get this error that says Sorry, “you do not have permissions to upload this type of file.” I really don’t know what I am doing wrong

    • This topic was modified 1 year, 3 months ago by johnybulletz.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Switch the site to English and provide the error message. That will make it easier for others to search for the code involved.

    Here are a few potential causes and solutions:

    1. File Permissions: Check the file permissions on the server where your WordPress site is hosted. Make sure that the wp-content/uploads directory has the appropriate permissions to allow file uploads. Typically, the directory should have 755 or 775 permissions.
    2. Server Configuration: Check the server configuration to ensure that the server allows file uploads. For example, if you are using Apache, make sure that the AllowOverride directive is set to All in the Apache configuration file. This allows the .htaccess file in the WordPress directory to enable file uploads.
    3. PHP Configuration: Check the PHP configuration (php.ini file) on your server. Make sure that the file_uploads directive is set to On, and that the upload_max_filesize and post_max_size directives are set to a value that is larger than the size of the image you are trying to upload.
    4. WordPress Configuration: Check the WordPress configuration (wp-config.php file) on your server. Make sure that the WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT directives are set to a value that is sufficient for image uploads.
    5. Image Size: Check the size of the image you are trying to upload. If the image is too large, it may exceed the maximum file size allowed by your server or WordPress configuration. Try reducing the image size or compressing the image and try uploading again.
    6. Retool Configuration: Check the configuration of your Retool application. Make sure that the API key or user account being used has the necessary permissions to upload files, and that the API endpoint and HTTP headers are set up correctly.
    7. Error Logs: Check the error logs on your server to see if there are any error messages related to the image upload. The error logs may provide more information about the cause of the error.
    Thread Starter johnybulletz

    (@johnybulletz)

    Hello! I was able to upload something to wordpress, what I did is put this line of code in wp-config.php “define(‘ALLOW_UNFILTERED_UPLOADS’, true);” but now the problem is that the image I uploaded is empty.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘media upload API’ is closed to new replies.