Hey guys - how does Formit handle input fields like this? <input type="file" name="test" id="test">
What exactly happens after submitting my form using the basic email hook?
The file gets attached to the email and is sent successfully - but is this true at all? Does it get attached? To me it seems as if the files get somehow embedded.
So: What exactly happens technically? I would like to get a better understanding of what actually happens there. The attachment is stored temporarily on the server? Where? For how long?
This is only true if the property &saveTmpFiles is set to 1.
Otherwise the file is attached to the mail directly from the temporary directory and should get deleted at the end of the request. See the documentation about $_FILES:
The file will be deleted from the temporary directory at the end of the request if it has not been moved away or renamed.
My Formit snippet call does not include any of these properties:
saveTmpFiles → because I don’t want the files to be stored on the server allowFiles → not set because true is default attachFilesToEmail → not set because true is default
So my Formit snippet call really has nothing special going on.
For my understanding the processing is like this:
1) file gets chosen via input 2) on submit the file is uploaded into a tmp directoryas written in the documentation:
Files will, by default be stored in the server’s default temporary directory, unless another location has been given […]
3) mail is being sent 4) file gets deleted from tmp directory
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.