Skip Navigation

[Resolved] Amazon S3 File Upload

This thread is resolved. Here is a description of the problem and solution.

Problem:
CRED was not saving the right path when using Amazon S3.

Solution:
We've fixed that and published an errata about it: https://toolset.com/errata/amazon-s3-cloudfront-domain-information-not-added-uploading-files-via-cred-forms/

This support ticket is created 8 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 -
- - - - - - -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

Tagged: 

This topic contains 21 replies, has 4 voices.

Last updated by Adriano 8 years, 2 months ago.

Assisted by: Adriano.

Author
Posts
#365797

I am trying to: Use the plugin "Offload S3" to host my file uploads through CRED Forms

I visited this URL: The Changelog says 1.4 added a workaround

Instead, I got: The files load perfectly when added through "Add Media" in the post body, but when I use a File Upload field in CRED the file path is not changed to the S3 path.

#365882

I am not sure what you refer to with "The Changelog says 1.4 added a workaround"

The Changelog for CRED 1.4 does not state any thin in regard to Amazon Cloud storage of images.
It mentions AJAX upload of large files, which refers to the Upload progress bar.

Can you elaborate your process, and what you would expect CRED to do?

If you have filed this issue previously, can you link to the relevant Thread?

Thank you for your cooperation

#365993

I am using CRED to post to a custom post type and want to serve the file attachments from Amazon S3 (Offload S3 Plugin). This works fine (path is changed to S3) as long as files are added through the "Add Media" button to the post body. Unfortunately when I have the same action using a File Upload field, the file path is not changed to the S3 path.

https://toolset.com/forums/topic/file-upload-custom-field-type-to-upload-to-amazon-s3-bucket/

This post seems to indicate that Types generally follows the standard WordPress upload flow, so I am curious why the paths would be correct in the Add Media instance and not in the file attachment method?

#366152

I need to consult this with the CRED Developer.

Can you elaborate:
- what the exact type of your Custom Field is (Image, File, etc)
- if the "Image Upload" button you refer to is the one in Dashboard > Posts > Edit > Add Media or the same one but in CRED forms?

You might need to run a Code to update the URL in the Field, but honestly I think the Plugin you are using is not considering Custom Field attachments or Files.

After I have above information I can consult this with the DEV Team

Thank you for your patience.

#366430

Thanks Beda. To answer your questions...

1. I have tried both image fields and file fields, though I would prefer to use a file field.
2. The "Add Media" works fine both in the Dashboard and in a CRED form - when using the add media field located within a WYSIWYG field.

#366715

OK, I need to escalate this as a Feature request, so the DEV can look into this and add the needed functionality.

I strongly assume, this is in fact a Types Plugin issue, not a CRED plugin issue.

Can you confirm the following points:

1. If the file/image is added in the WordPress Admin > Posts > Edit > Types Field, it also does not work properly?

2. ONLY the Image/Media Upload present in the editor is working properly (no matter if front or backend.

If that is the case it's a problem with the Types Fields.

If it works great in the WordPress backend, but (only) not with CRED, then it's a CRED Issue.

As soon you can confirm this above I will inform the Developers.

Thank you for your kind cooperation.

#366720

To clarify:

Using the "file" (types field), the link IS changed correctly to S3 when uploaded in the backend but NOT changed correctly when uploaded via CRED form.

Using the "add media" section of the editor (WYSIWYG Post Body), the link IS changed correctly to S3 whether it is uploaded in the frontend (CRED) or backend editor.

So, it appears we are only having an issue when uploading using the types "file" field in the frontend at this point.

Thanks for your continued help Beda.

#366823

OK, thank you for this clarification.

I will ask if we could setup a DEV instance to test this live, and so the DEV Team can look into this issue.

I apologize in advance if this is going to take some time, we are in the last steps of a DEV Cycle and need to finish this for release before we can take on new issues and features.

Thank you for reporting the issue so clearly and for your patience.

#367852

How do we go about doing that? Not sure I want to share my AWS credentials with everyone...

#368070

Hello,

I’m Adriano, Toolset support lead and I have been escalated to this thread. I’ll give my best to help you to achieve your needs through Toolset components.

Our development team is aware about that issue already. I'll notify you as soon as I hear something back.

#369947

Thanks Adriano. Are there any updates to report?

#370263

No yet, sorry. I'll notify you as soon as I hear something.

#370934

I need to request temporary access (wp-admin and FTP) to your site in order to be offering better help. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

#371115
robust-find-replace-upgrade.jpg
aws-S3-bucket-url.jpg

The plugin is hidden link. I understand exactly what @justinb-5 is referring to. I also use that plug-in, and yes, it uploads to the default /wp-content/uploads/ folder, which S3 plugin initially uses before then uploading to S3 bucket and changing file name and path from WP default to whatever is set in plugin settings. But, it leaves behind ghost URL in custom post types and you get 404 errors.

1). Plugin Author offers a devel tweaks plugin here. Don't know if it is applicable, but worth checking out.

Plugin Name: WP Offload S3 Tweaks
Plugin URI: hidden link
Description: Examples of using WP Offload S3's filters
Author: Delicious Brains
Version: 0.1.1
Author URI: hidden link

2). They offer a free "Enable Media Replace" hidden link. I installed it and it's basically useless.

3). If all else fails you gotta upgrade to get their Gold level membership for "Robust Find & Replace" feature that allows you to bulk replace all existing S3 attachment URLs at once. hidden link

Hope there's a Toolset specific resolution to combat this plugin incompatibility. Otherwise, you have to go back and manually edit each file links from the back-end menu of post type's Admin console. File attachments URL cannot be edited on the front-end CRED edit view.

Please update if you found a solution. Thanks. 🙂

#371545

Thank you for sharing this, I'll let you know as soon as I find something.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.