DHolloran/WPMultiFileUploader

How to get the attatchmentid

Closed this issue · 4 comments

dhwpmf
hi DHolloran
hi this is anudeep, in my plugin i am using your code every thing perfectly working but i kept this is one form i want to save the attachment id in another table after uploading so i searched every js page,but i didnt found how to pick the attachment id, please help me out from an issue

thanks in advance
Anudeep
anudeepsharma4u@gmail.com

As long as the upload form is in a form element each file uploaded the plugin will add a hidden input field name="wp_multi_file_uploader_[NUMBER]" with [NUMBER] representing the amount of files starting at 1 and the value will be the uploads attachment id. I've had a report of it not working when it is nested in certain elements but I could never replicate it. I would suggest using a for each loop on the $_GET/$_POST and check for the existence of wp_multi_file_uploader in the array key. If you have any issues let me know.

ok i will try and let you know

Anudeep
anudeepsharma4u@gmail.com

boss i checked it, i am unable to do the process
please see below html code is coming like this..

    <div class="qq-uploader">
        <div class="qq-upload-drop-area" style="display: none;"> … </div>
        <div class="qq-upload-button qq-upload-button-hover" style="position: relative; overflow: hidden; direction: ltr;"> … </div> <span class="qq-drop-processing"> … </span>
        <ul class="qq-upload-list"> <li class=" qq-upload-success">
                <div class="qq-progress-bar" style="display: none; width: 100%;"></div>
                <span class="qq-upload-spinner" style="display: none;"></span>
                <span class="qq-upload-finished"></span> <span class="qq-upload-file"> DHWPMF.png </span>
                <span class="qq-upload-size" style="display: inline;">18.0kB</span>
                <a class="qq-upload-cancel" href="#" style="display: none;"> Cancel</a><a class="qq-upload-retry" href="#" > >
    

    when saving time i need to save the post id of wp_posts in db table with the author_id so this is my concept i think u got my point..

thanks boss i resolved my problem