Get the post_id from referer, Where the post_id is the ID of the parent post to attach the file.
When opening in a popup, get post_id parameter, like used with WP media-uplad.php (/wp-admin/media-upload.php?post_id=1045&TB_iframe=1&width=640&height=482) with the class="thickbox".
Another suggestion,
Get the post_id from referer, Where the post_id is the ID of the parent post to attach the file.
When opening in a popup, get post_id parameter, like used with WP media-uplad.php (/wp-admin/media-upload.php?post_id=1045&TB_iframe=1&width=640&height=482) with the class="thickbox".
Thanks!