Giter VIP home page Giter VIP logo

Comments (5)

itayariely avatar itayariely commented on May 27, 2024 1

Ok
this what I did to make it work:
in config/plugins/wordpress/wordpress-s3uploads.php
change this:
define('S3_UPLOADS_KEY', $env['user']);
define('S3_UPLOADS_SECRET', $env['pass']);
define('S3_UPLOADS_REGION', str_replace(array('s3-', '.amazonaws.com'), array('', ''), $env['host']));
define('S3_UPLOADS_BUCKET', ltrim($env['path'], '/'));

in to:
define( 'S3_UPLOADS_BUCKET', 'my-bucket-name' );
define( 'S3_UPLOADS_KEY', 'my-aws-key' );
define( 'S3_UPLOADS_SECRET', 'my-aws-secret' );
define( 'S3_UPLOADS_REGION', 'my-s3-region );

and it work

from wordpress-heroku.

PhilippHeuer avatar PhilippHeuer commented on May 27, 2024

You'r right, since you can't write to the heroku filesystem you can't write to that file - but we can still use all the other features of the plugin for security.

But the error you get has no relation to the issue you have with uploading media files. If you want to upload media files, than you need to provide heroku with an external storage.

Check out the Persistent Storage (Optional) Step in the Deployment - Heroku - Manual instructions in https://github.com/PhilippHeuer/wordpress-heroku/wiki/Deployment to use Amazon S3 as storage.

from wordpress-heroku.

hamiltondfp avatar hamiltondfp commented on May 27, 2024

I actually do have S3 set up following those instructions.

I was assuming that maybe I wasn't even getting to the point of looking up the S3_AWS_URL because I was only getting the above error in the Papertrail logs.

I am using Bucketeer. I believe I am constructing the S3_AWS_URL the same way you are using the bucketeer variables here:
https://github.com/PhilippHeuer/wordpress-heroku/blob/9b8ef96ca8a77bf4826f32bbfc1473815c823f50/config/plugins/heroku/heroku-bucketeer.php

Except where you use s3.amazonaws.com, I am using s3-BUCKETEER_AWS_REGION-amazonaws.com.

I have tried populating the AWS_S3_URL manually, and I have tried removing it and letting the above code construct the URL (which I believe will not work since my bucket is in us-east-1).

On a whim, I also tried encoding the '/' characters in my SECRET_ACCESS_KEY to %2F, but that didn't make a difference.

Also, I am getting this error in the WordPress UI

“1121f00.jpg” has failed to upload.
The uploaded file could not be moved to uploads/2017/11.

This suggests that it is still trying to write locally, correct?

from wordpress-heroku.

PhilippHeuer avatar PhilippHeuer commented on May 27, 2024

To clarify about the heroku filesystem, you can write to it locally, but the data is lost after a short while.

Your uploading issue occurs when you try to store the file locally, before it is uploaded to the external storage. I tried to reproduce your issue but it didn't happen to me when i followed the instructions in the wiki to deploy a new instance.

Did you modify anything else?

from wordpress-heroku.

itayariely avatar itayariely commented on May 27, 2024

Hi,
Have same isssu
even tryed to change to:
putenv(sprintf('AWS_S3_URL=s3://%s:%s@%s/%s', $env['user'], getenv("BUCKETEER_AWS_ACCESS_KEY_ID"), getenv("BUCKETEER_AWS_SECRET_ACCESS_KEY"), getenv("BUCKETEER_BUCKET_REGIONS"), getenv("BUCKETEER_BUCKET_NAME")));

from wordpress-heroku.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.