WordPress.org

Ready to get started?Download WordPress

Forums

Amazon S3 and Cloudfront
[resolved] Unable to upload jpg and png, But pdf no problem (4 posts)

  1. niw2cp
    Member
    Posted 5 months ago #

    I am running WordPress on Hostgator with Amazon S3 and Cloudfront plugin. I can upload .pdf and .txt files and they save in the S3 bucket. But .jpg and .png are saving locally.

    The same configuration on a different host is saving to S3 bucket for all file types.
    Whether key and secret are in config.php or database, gives the same result.
    Bucket is set to US Standard.
    I am getting no errors and nothing shows in the S3 log file or local error_log.
    Plugin is 0.6.2
    PHP is 5.4.

    Any ideas? Where should I start looking?

    https://wordpress.org/plugins/amazon-s3-and-cloudfront/

  2. niw2cp
    Member
    Posted 4 months ago #

    This appears to be controlled by WordPress mime type.
    Since jpgs and pngs are set to the image mime type. If you change them to the application mime type, the images begin to upload to S3.

    I'll submit a code suggestion to github.

  3. ryanphung
    Member
    Posted 2 months ago #

    Hi niw2cp,

    I think I'm facing exactly the same problem with hostgator. Do you mind sharing what did you do to resolve it? Thank you.

    Regards,
    Ryan

  4. niw2cp
    Member
    Posted 2 months ago #

    I moved to another host. I worked with HG to resolve the issue, but neither of us could figure it out. I suspect there is an issue with the multiple image upload to AWS.

    Only image mime types get broken into smaller versions (thumb, medium, etc), so setting to another mime type bypassed WordPress's image resizing process. Viola, a single image file successfully uploads to S3, but with two problems.

    The image on S3 is now only at the original filesize with no smaller versions. And, the admin area will show filetype icons instead of the image thumbnail. :(

    I lost the trail at the SSL version for cURL. (See my issue at Github. https://github.com/bradt/wp-tantan-s3/issues/64) Do you have a VPS with HG? You may be able to control things like that.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.