Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter marcoliocops

    (@marcoliocops)

    Thanks for the attachments url, which I am extracting the file directly from. file_get_contents("../../apps/wordpress/htdocs/wp-content/plugins/si-contact-form/attachments/$pic_name", true); I know its barbaric but I’m looking for a better way to do this.
    I haven’t been able to get the file using your code snippet though… Would I place this code in the theme’s functions.php file? is self::$uploaded_files a variable within this class? I imagine the error is that php cannot find the variable $uploaded_files. Is there something av missed? kindly expound..

    Interestingly though, the files on the attachments folder are left on the server even if I disable the option Enable to not delete email attachments from the server

    Mark

    Thread Starter marcoliocops

    (@marcoliocops)

    I have tried the do action hook. =>$value displays all posted data as a string. I receive

    File is attached: pictiure.png

    I would like to use file_get_contents($_FILES["fileToUpload"]["tmp_name"]); to get the file contents and convert to base64.
    Question: Can I retrieve file contents in php before its deleted from the server?
    II: how come all data posted is in string? I would much rather receive the url of the picture’s location on the server rather than “file is attached…..”

    Mark

Viewing 2 replies - 1 through 2 (of 2 total)