[pmwiki-users] What attachment operations do you want or need?
eemeli at gmail.com
Thu May 6 03:36:41 CDT 2010
On 6 May 2010 11:49, SteP <step.list+pmwiki at gmail.com> wrote:
> I would like a way to upload - and markup - images without being aware of their underlying file type.
This should actually be relatively easy, made up of two parts. How about this:
When uploading, if there is no file extension or if the extension
isn't recognised, you append the extension of the file as it was on
the user's local machine.
When marking up, add a replace-on-edit rule for Attach:... if there is
no file extension or if the extension isn't recognised, in which case
the extension of the first matching uploaded attachment is appended.
This won't handle PNGs mislabeled as GIFs or other such mistakes, but
for images at least in my experience browsers are actually pretty good
at ignoring incorrect information and just showing the picture.
Are typos in the extension (eg. GFI, PING) common enough that they
should be recognised and fixed?
Another option for the upload is to add a query or dialog of some sort
to the uploadsuccess page that would let the user fix the mistake or
let it go through, if it was intentional. And if we're doing that,
it'd make sense to check the actual mimetype of the file and if it
doesn't match the extension, tell the user about it. But to be honest,
it'd be much simpler and cover almost all actual use cases to just do
the fix silently -- assuming there's functionality available for
More information about the pmwiki-users