We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d90a51 commit 488a530Copy full SHA for 488a530
1 file changed
inc/wplf-ajax.php
@@ -59,7 +59,8 @@ function wplf_ajax_submit_handler() {
59
// Is this enough security wise?
60
// Currenly only supports 1 file per input
61
$attach_id = media_handle_upload( $key, 0, array(), array( "test_form" => false ) );
62
- add_post_meta($post_id, $key, $attach_id);
+ add_post_meta( $post_id, $key, wp_get_attachment_url($attach_id) );
63
+ add_post_meta( $post_id, $key . "_attachment", $attach_id );
64
}
65
66
0 commit comments