Hi Jon,

> I've changed my mind: I think this is a PicoLisp wiki problem. ;-)

Yes, it must be somehow.

> After all, I have successfully uploaded a wiki logo and a picture of
> myself to my local wiki. It's just the embedded ones, <{...} and >{...}, I
> have problems with.

The difference may be that the logo and the picture in the +User object
have the "correct" file extension. In case of the logo it is ".png", and
for the user picture it is ".jpg".

In case of the (embeddedable) blobs it it just ".d", to avoid any
assumption about the type of the blob. After all, it should be possible
to upload all kind of media in the future (currently only 'img' and
'video' are expected, though).

Could it be that the browser insists on a proper file name extension?

> > The data seem to be there. So perhaps the reason is that the HTML
> > generated by the server is not correct? There must be something like
> >
> >    <img src="db/wiki/blob/2/-/G.d" alt="MyImg" class="right"/>
> No, I get no <img ...> tag, just the MyImg as plain text.

Really? In the generated HTML code? E.g. if you view the page source in
your browser?

Then of course the browser won't try to download the picture. This would
mean, however, that the 'file' command did not recognize the mime type
of the data when the blob was built. This happens in line 118 in
"wiki/er.l", in the update method of the '+Bin' class, which is fired
when the binary data are set or changed.

> Is there somewhere in the wiki code I can put a debug/println line to
> check what happens to the file I try to upload?

You could modify the next line (line 119) to

   (msg (line T))

to display on standard error what the 'file' command returns. Or simply
call 'file' in the shell manually on your image test file.

- Alex
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to