Hi Hannes,
Hannes Hirzel wrote:
Hannes Hirzel wrote:
Hannes Hirzel wrote:
My question applies to the Squeak implemenation
of smallwiki.
The mime type isn't set for jpg, gif and wav files
To be more precise: The mime type is not set in the action class
SWResourceEdit or one of its superclasse SWEditAction or SWAction.
Common mime types are (just strings) in the instance variable mimetype
'image/jpg'
'image/gif'
'audio/wav'
In the method renderFields of SWResourceEdit
the following code snippet does not work correctly.
html fileUploadWithCallback: #data:mime:
The mime type returned is the empty string.
Is Mime supported in the VW-SmallWiki?
As I understand, the mimetype is set when you create a new Resource, but
not, when you upload the data (or a new version). The default value is ''.
I will take a look if we can add this support, so the mimetype will be
set correctly when you upload the data.
Regards
Chris Burkert
Thank you that you will look into this. From my perception the bug is in
the method I mentioned above. For the wiki I set up I use the following
a crude workaround
1) in SWResourceEdit>>#data:mime
I comment out the setting of the mime type
(it would set it to nil which I don't want)
2) in SWResourceEdit>>renderFields
I add
html tableData: [html textInputWithValue: self mime callback: #mime: ]]
So I have the user to input the mime type manually in a text field.
For the moment I think this is fine. I was not able to find the bug
and to fix it along the lines of the original design.
Regards
Hannes Hirzel