• Resolved Kyle Numann

    (@kyle-numann)


    Hello,

    Thanks for your work on this plugin. I am trying to set up a system to export ‘Job Candidate’ user data as a CSV file to send to local companies looking to hire.

    I’ve got everything else working, but I am struggling to retrieve the actual URL of the user ‘resume’ file upload field, to add resume links to the CSV export.

    Checking the database user meta info, all I see is the ‘temp’ url and ‘temp’ filename, which do not link to the final uploaded file. I wanted to use the ‘get_download_link’ method from includes/core/class-files.php but that download URL is formatted using a nonce, which won’t work in a CSV file that has been downloaded and shared.

    Is there a hidden method I am missing? Maybe I could call ‘get_download_link’, and then immediately load that URL via ajax, and save that returned URL? Any hints or guidance would be much appreciated. Thanks again!

Viewing 4 replies - 1 through 4 (of 4 total)
  • @kyle-numann

    The uploaded file name you can get from the array returned by um_user( 'submitted' )

    Thread Starter Kyle Numann

    (@kyle-numann)

    Thank you @missveronicatv for the quick response, that helps me along my way.

    I think I had misunderstood how UM handled file uploads. I thought they were abstracting the uploaded filename in the database/front-end only… but now as I investigate, I see that the uploaded files are saved in the filesystem with their abstracted file names (at wp-content/uploads/ultimatemember/{userID}/filename.

    I guess the UM ‘download link’ method changes the filename back to the original dynamically during the download process? So, if I was just looking to get a static web link to the file, the best I can do is link to the ‘wp-content/uploads/ultimatemember/{userID}/…’ location with the abstracted filename, unless I also want to develop a custom file renaming convention?

    If so, that is better than nothing. Just want to check that I am correct in my observations. Thanks again.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @kyle-numann

    Yes, UM is using that file URL pattern. And then uses a different URL pattern for download. Your observations are accurate.

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @kyle-numann

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved…

    Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help… ??

    Regards,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Retrieve actual URL for ‘file upload’ field files?’ is closed to new replies.