At suggestlink.tpl I have the following code to upload images and it's working correctly submitting the images: <input type="file" name="photo1attach">
The problem I face is when not all other required fields are filled: At this case we are presented the suggestlink page with the phrase: 'You did not complete all of the required fields', so we complete the pending required fields, but after submitting the link, it do not shows the images previously selected.
I have tried using: <input type="file" name="photo1attach" value="{LINKPHOTO1ATTACH}"> <input type="file" name="photo1attach" value="{LINKPHOTO1ATTACHNAME}"> <input type="file" name="photo1attach" value="{LINKPHOTO1ATTACHTITLE}">
But none of them seems to work remembering the image at the page asking to complete the other pending fields.
No, it's not working. <?php echo $_FILES['photo1attach']['name']; ?> is not showing anything at suggestlink.tpl after not completing all the required fields.
When suggesting a link with attachments but without another required field, the attached files seems to be uploaded as it takes time the page to refresh, but I do not find any attachment at the attachments directory looking from ftp.
Maybe a nice performance would be not to upload any attachment before all required fields are completed, but to remember the location of the attached files of the client pc. If possible.
Hello Paul, Just to know if you can have some some update on this inquiry.
Specially if you can give me an idea on how to remember the location of the attached files on the client pc, this after not completing other required files. Or better to not upload the images if other required fields are not completed, but to remember the location of the attached images on the client pc.
$_FILES['userfile']['name'] does contains the name, but it can't be placed in the file box because value= isn't implimented by browsers:
The HTML 4.01 specification describes the value attribute for a file input field by saying that browsers (user agents) "may use the value of the value attribute as the initial file name". This however is usually not supported by browsers. The usual explanation is "security reasons".
As summarized there: "Thus, they just failed to implement it, for no good reason." Probably they're scared of all those people who click "ok" to any message and thus render warnings about the file being uploaded useless.
Also when submitted a non completed all required fields form, are the attached files uploaded and temporarily saved at the server? are these attachments automatically deleted from the server side after a time?
Comments on link custom attachments
Forum Regular
Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 172
Total Comments: 462
Paul,
At using custom file attachments for links:
At suggestlink.tpl I have the following code to upload images and it's working correctly submitting the images:
<input type="file" name="photo1attach">
The problem I face is when not all other required fields are filled:
At this case we are presented the suggestlink page with the phrase:
'You did not complete all of the required fields',
so we complete the pending required fields, but after submitting the link,
it do not shows the images previously selected.
I have tried using:
<input type="file" name="photo1attach" value="{LINKPHOTO1ATTACH}">
<input type="file" name="photo1attach" value="{LINKPHOTO1ATTACHNAME}">
<input type="file" name="photo1attach" value="{LINKPHOTO1ATTACHTITLE}">
But none of them seems to work remembering the image at the page asking to complete the other pending fields.
Thanks.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Does <?php echo $_FILES['photo1attach']['name']; ?> work?
Forum Regular
Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 172
Total Comments: 462
No, it's not working.
<?php echo $_FILES['photo1attach']['name']; ?>
is not showing anything at suggestlink.tpl after not completing all the required fields.
When suggesting a link with attachments but without another required field, the attached files seems to be uploaded as it takes time the page to refresh, but I do not find any attachment at the attachments directory looking from ftp.
Maybe a nice performance would be not to upload any attachment before all required fields are completed, but to remember the location of the attached files of the client pc. If possible.
Forum Regular
Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 172
Total Comments: 462
Hello Paul,
Just to know if you can have some some update on this inquiry.
Specially if you can give me an idea on how to remember the location of the attached files on the client pc, this after not completing other required files.
Or better to not upload the images if other required fields are not completed, but to remember the location of the attached images on the client pc.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
$_FILES['userfile']['name'] does contains the name, but it can't be placed in the file box because value= isn't implimented by browsers:
from http://www.cs.tut.fi/~jkorpela/forms/file.html
As summarized there: "Thus, they just failed to implement it, for no good reason." Probably they're scared of all those people who click "ok" to any message and thus render warnings about the file being uploaded useless.
Forum Regular
Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 172
Total Comments: 462
Thanks for the information and the link.
Also when submitted a non completed all required fields form,
are the attached files uploaded and temporarily saved at the server? are these attachments automatically deleted from the server side after a time?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Non-custom files get deleted after 8 hours, but custom file field files stick around until you run the unused attachments utility.