• I am using the Custom Submission Action plugin to create a custom formatted post from the form data. I am stuck though with how to insert a link to a file which is uploaded in the form. I can access the file data with $args[‘data’][‘lib-file’].

    I think the best way to do it is to embed it in a hyperlink. Something like this: [filename] . Does anyone have an idea as to how I can determine the [address] and [filename]?

    Thank you so much for any help you can provide.

    http://wordpress.org/extend/plugins/wordpress-form-manager/

Viewing 1 replies (of 1 total)
  • Plugin Author hoffcamp

    (@hoffcamp)

    If you go into types/file.php from lines 73 to 97, you will see the code that saves the file data ( as of 1.6.26 ).

    The value will be an array containing the following keys:

    filename – the file name and extension, without the path, for example something like ‘thefile.txt’
    contents – this will be empty if an upload directory is used. Otherwise, it is the file contents.
    upload_dir – a boolean, true if an upload directory was used.
    size – file size in bytes.

    If you are using %wp_uploads_url% in the file item, then you can get this URL in PHP by doing the following:

    $uploads = wp_upload_dir();
    $url = $uploads['url']
Viewing 1 replies (of 1 total)

The topic ‘[Plugin: WordPress Form Manager] Linking to an Uploaded File’ is closed to new replies.