CWS API: how to set right mime type when upload document content

Hi all,

using cws API, and then docman and content services, how can you pass the mime type of a document when loading its content?

When you fill the FileAtts structure with the full filename (also with the extension part), then CS set the mime type using the extension if it is known, but if the filename does not contain the extension part, CS set the mime type to octet stream.

How is it possible to programmatically pass the mime type?

Thanks in advance

Tagged:

Comments

  • Hi Matteo,

    CWS sets the mimetype for an upload based on the file extension of the attachment. A server configuration provides the mapping between extensions and mimetypes.

    To set a different mimetype after an upload an update to the item would be additionally needed. (This can be done with a simple UpdateVersion().)


    -chris