- assigned_to: nobody --> jamiemccarthy
The blob plugin chops sometimes chops the first letter off the upload's
filename when you attach a file upload to a story (or anything that uses
Blob.pm's create() ).
This behavior can be reproduced with:
Blob.pm 1.15
blob.pl 1.12
fileadmin 1.12
The filename you upload must not have a file extension that matches
any that are defined within the stock code:
http://slashcode.cvs.sourceforge.net/slashcode/slash/plugins/Blob/
Blob.pm?revision=1.15&view=markup
my %mimetype_overrides = (
mp3 => 'audio/mp3',
rpm => 'application/x-rpm',
text => 'text/plain',
xls => 'application/ms-excel',
);
So if you upload test.png to a story, it will be saved as 'est.png'.
testing uploading files with Safari 2.04, Firefox 1.5.0.4 and Camino
2006021400 (1.0)
If you upload a file of a type that is known to mimetype_overrides, the
filename won't be chopped. (atleast, I've known been able to make that
happen in my tests).
Example of the insert from admin.pl:
select id,content_type,filename,seclev from blobs where
id='5becbdce021a7a7b0f65670243bb0909';
+----------------------------------+--------------
+----------+--------+
| id | content_type | filename | seclev |
+----------------------------------+--------------
+----------+--------+
| 5becbdce021a7a7b0f65670243bb0909 | image/png | est.png |
0 |
+----------------------------------+--------------
+----------+--------+
I didn't know if this should be filed under 'other', or 'stories', since
most people seem to use blobs for stories primarily, so I'm setting to
Stories.