There is a "Logo" property in the XWiki.XWikiSkins class. Actually it will refer to an attached file which has the same name with the string content, like "logo.png". As I know, it's the only way to create an object with an image property in XWiki.
If I want to upload a file (e.g. logo.png) to an object, I must create the object in inline mode, then attach a file in view mode. Why don't we just keep an attatchment form in inline mode?
AdminImportSheet is a good example that contains the attachment form in its Inline form.