Reply To: Direct to S3 File Path

Gary Michael
Support Manager


Something like this:

add_filter( 'syncs3_put_object_file_path', 'customize_syncs3_path', 10, 6 );
 * Custom logic to set the bucket name in SyncS3 for Gravity Forms
 * @param string 	$path 			File path to return. Make sure the path ends with $file_name.
 * @param string 	$file 			Local file URL when uploaded
 * @param string 	$file_name 		Name of uploaded file
 * @param int 		$field_id 		ID of the fileupload field
 * @param int 		$form_id 		ID of the form
 * @param array 	$entry 			Entry data
 * @return string 	Bucket name
function customize_syncs3_path( $path, $file, $file_name, $field_id, $form_id, $entry ) {
	// Custom logic
	$path = "JobID:{$entry['id']}/{$file_name}"; // Make sure the new path includes the file name
	return $path;

For more info about the entry data, see

Your Cart
Your cart is currently empty.
Open Cart