[pmwiki-users] java pop-up for duplicate upload name
gmane at auxbuss.com
Wed Feb 13 12:59:25 CST 2008
david roundell said...
> i would like to have a script to warn our users that the filename they
> intend to use on an upload is already in use. ideally the pop-up
> should state are you sure you wish to overwrite the file yes/no?
> whether this should be in java or html is not essential.
> the script
> needs to work for i.e6 only as it is only used at work and i.e6 is the
> only browser we can use!
Ouch! But really, no-one here is likely to want to produce something for
any one browser, perhaps least of all IE6 which was, and remains, a
> similar to this script:
I don't know this recipe, but you might want to consider the
$EnableUploadVersions option. See the docs:
When set to 1 (default is 0), uploading a file to a location where a
file of the same name already exists causes the old version to be
renamed to file.ext,timestamp (instead of being overwritten). timestamp
is a Unix-style timestamp.
Alternatively, the fix looks like pointing $UploadVerifyFunction,
at your own function and, probably, calling UploadVerifyBasic() before
your code - with an appropriate escape for the '' return value.
It might even work in IE6!
More information about the pmwiki-users