[pmwiki-users] java pop-up for duplicate upload name
marc
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.
Well, Java would be overkill, but I suspect that you mean JavaScript ;-)
> 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
disaster.
> similar to this script:
> http://www.pmwiki.org/wiki/Cookbook/ConfirmEditNotSaved
I don't know this recipe, but you might want to consider the
$EnableUploadVersions option. See the docs:
$EnableUploadVersions
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!
--
Cheers,
Marc
More information about the pmwiki-users
mailing list