on 03-12-2008 4:30 PM
Hi Everyone!
I have developed a wd application which makes a upload files to KM. We have configurated the KM repository for that the images can be seen in miniatures. For that, we need to set the mime type when make the upload. It works fine for .gif images, but not for jpg or jpeg.
When I ask for see the image's details in KM, I can see that for jpg image, the mimetype set is "Binary file (application/octet-stream)" and for gif image, it's image/gif. Why am I getting application/octet-stream mimetype for JPG images? My code is:
IWDResource resource = wdContext.currentContextElement().getResource();
InputStream input = resource.read(true);
ICollection folder = (ICollection) getResource(wdContext.currentContextElement().getPathFolder());
Content content2 = new Content(input, resource.getResourceType().getHtmlMime(), input.available());
resource.getResourceType().getHtmlMime() is the code I have used for get the Mimetype.
Does anybody have any idea what is wrong?
Regards!
Luiza
Hello.
I think this blog explains file uploading and downloading pretty good.
/people/bertram.ganz/blog/2007/05/25/new-web-dynpro-java-tutorials--uploading-and-downloading-files-in-sap-netweaver-70
Regards, Mikael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.