Image is uploaded anspress-tmp folder but after submission it’s not uploaded in Amazon S3.

4.08K viewsIssuesamazon s3
0

Hello,
Thank you for this great plugin and also askbug. I’m integrating anspress with amazon S3 using s3-uploads (https://github.com/humanmade/S3-Uploads) everything works well. avatar images are saved in s3. But when i’m creating a question, or an answer with an image, when i upload the image, it appears in amazon s3 folder anspress-tmp, but when i submit the form the image is not moved to anspress-uploads folder, and i can not find it anywhere

Answered question

So i now understand my problem.
The S3 plugin reacts to file upload. That’s why upload to temp folder is working. But perhaps, after that, a move_uploaded_file is perform. But the S3 plugin does not react to it. So how can i change to behavior of the section where the file is moved from temp to uploads?

0

Hello Joel,
Let me give this plugin a try. I’ll provide the code if small change required.

Posted new comment

Thank you in advance Rahul

It seems best way would be create WP attachments for AnsPress uploads. As some major work is in progress for upcoming version so I will not be able to provide a fix right now but this will be addressed in upcoming version.

Hello Rahul,
For now i managed it by using an amazon lambda function, that copy the file from anspress-temp to anspress-upload every time a file is copied inside. I keep waiting for the next version, hoping you will implement something for it.