1

On Drupal 6, I have a webform that needs to collect file uploads. I can do this of course through the File type. However, I'd like to not leave these files sitting in a folder visible to Apache.

Using the following

hook_webform_submission_presave($node, &$submission) { 
        print_r($node);
        die();
    }

I can see the following data structure.

        [components] => Array
            (
                [1] => Array
                    (
                        [nid] => 156117
                        [cid] => 1
                        [form_key] => test
                        [name] => TEST
                        [type] => file
                        [value] => 
                        [extra] => Array
                            (
                                [savelocation] => creative/samples
                                [title_display] => before
                                [private] => 0
                                [filtering] => Array
                                    (
                                        [size] => 800
                                        [types] => Array
                                            (
                                                [0] => gif
                                                [1] => jpg
                                                [2] => png
                                            )

                                        [addextensions] => 
                                    )

In the [extra][savelocation], could I modify this to a folder that is not accessible via apache? How would I properly update the database entry?

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.