Image Carousel and Content Type

I have some URLs for images and PDFs that are being put the SAP Carousel. I'm having the following issue. The URLs I'm using are links to documents in FileNet....which don't end with the file extension...they end with a GUID of the document like so:
http://www.someplace.com/WorkplaceXT/getContent?mode=download&objectStoreName=test&objectType=document&id={97F6083D-D679-41AB-8758-BD2AEEF14E69}
The only place I've seen where I can tell if the file is an image or a PDF is in the Response Headers for that image URL in the "Content-Disposition" header.
Let's say I have 3 images/PDFs...
<img src="http://www.someplace.com/WorkplaceXT/getContent?mode=download&objectStoreName=test&objectType=document&id={97F6083D-D679-41AB-8758-BD2AEEF14E11}"/>
<img src="http://www.someplace.com/WorkplaceXT/getContent?mode=download&objectStoreName=test&objectType=document&id={97F6083D-D679-41AB-8758-BD2AEEF14E69}"/>
<img src="http://www.someplace.com/WorkplaceXT/getContent?mode=download&objectStoreName=test&objectType=document&id={97F6083D-D679-41AB-8758-BD2AEEF14E55}"/>
What is the best way for me to tell what type of content is actually represented? Can I access the "Content-Disposition" header easily when I load each of the images/PDFs from the URL?

hi
try something like this.
declare
      f varchar2(100);
begin
     f := webutil_file.file_open_dialog();
     if f is not null then
          :block.item := f;
          end if;
     end;or try the following code.
declare
l_file_name varchar2(383);
begin
l_file_name := webutil_file.file_open_dialog( );
if
  l_file_name is not null
then
  if
    :block.rowid is not null
  then
    create_record;
  end if;
  client_image.read_image_file ( l_file_name, substr ( l_file_name, instr ( l_file_name , -1 ) ), 'block.item' );
end if;
end;sarah
Edited by: QGIRCO on Jan 20, 2010 8:51 AM

Similar Messages

  • Error after updating field and content type

    Hi,
    I have a feature with a custom list and content type.
    I changed one field type from Text to Note, and made the same change in my Schema.xml file.
    But after deploying I get an error when I visit my list.
    "The file name you specified could not be used.  It may be the name of an
    existing file or directory, or you may not have permission to access
    the file".
    I have several sites with the same list, and all gives the same error.
    What I understand from the ULS logs it can't find my schema file, but when I look at the 14 hive it is there.
    ULS
    Failed to open the file 'schema.xml'.
    Failed to retrieve the list schema for feature {4D3315CB-7F20-4DB3-9CB3-258AC110F9BC}, list template 21973; expected to find it at: "".
    Any ideas about how to fix this?
    The text expected to find it at: "" can be the problem as I have my schema file in a folder named Correspondence List.
    And in the 14 hive I find the schema at 14\TEMPLATE\FEATURES\my feature\Correspondence List\Schema.xml
    This is from my manifest file:
    <ElementManifest Location="Correspondence\Elements.xml" />
    <ElementManifest Location="Correspondence List\Elements.xml" />
    <ElementFile Location="Correspondence List\Schema.xml" />
    Any help are appriciated

    Hi,
    Any update?
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • HTTPS and content type images

    Why is image considered a unsecure content type over HTTPS?
    Thanks

    That's meaningless. Everything is secure over HTTPS as long as it's implemented properly at both ends.
    Possibly you are referring to mixed HTML pages where the text is transmitted via HTTPS and the images via HTTP.

  • Mapviewer SVG and Content-Type http header

    Hello,
    We have a Mapviewer installation that seems to be serving up the wrong Content-Type header for the SVG charts. The map is being created correctly and we can get GIF's and such.
    The wrong Content-Type causes the Adobe SVG viewer to never render the SVG map successfully. When I save the SVG file to the desktop it opens perfectly or if I statically link it in to the web page from the sever it also opens perfectly. Is there some configuration that is missing somewhere on the mapviewer or the application server to correctly set the Content-Type ?
    Notice the content type of the failing map compared to a working SVG chart we have.
    HTTP/1.x 200 OK
    Content-Length: 41979
    Cache-Control: private
    Content-Type: application/octet-streamConnection: Keep-Alive
    Keep-Alive: timeout=5, max=999
    Server: Oracle-Application-Server-10g/10.1.2.0.0 Oracle-HTTP-Server OracleAS-Web-Cache-10g/10.1.2.0.0 (N;ecid=92576875655,0)
    Last-Modified: Wed, 16 Aug 2006 20:31:58 GMT
    Date: Wed, 16 Aug 2006 20:32:01 GMT
    Accept-Ranges: bytes
    instead of a working SVG graphic
    HTTP/1.x 200 OK
    Date: Wed, 16 Aug 2006 20:35:32 GMT
    Server: Oracle9iAS/9.0.2 Oracle HTTP Server Oracle9iAS-Web-Cache/9.0.3
    Content-Length: 3831
    Content-Type: image/svg+xml; charset=utf-8Connection: Keep-Alive
    Keep-Alive: timeout=5, max=999
    This seems to be the last sticking point in successfully rolling out this mapviewer implementation. Any help would be greatly appreciated.
    Thanks, in advance.
    Thanks,
    Carl

    Hello,
    Thanks for the reply I've tried both SVG_URL and SVGZ_URL and used a http header sniffer to watch what's getting served up and the urls associated with MapViewer SVG are definitely getting served up with that wrong Content-Type.
    Our front end is an Oracle APEX environment were we use APEX's SVG charting on the same page and they are getting served up with the correct Content-Type and display correctly, which is nice cause I can watch the header difference's side by side, and we know the mapping itself is working right because we can get image files back
    Is there a sever config file or something like the httpd.conf for apache that needs to be set?
    Thanks for any help or insight
    Carl

  • Image size and mime type.. non-java guy needs help

    Image size, mime type.. non-java guy needs help
    Im not at all familiar with java so this is really weird for me to work out. I?ve been doing it all day (and half of yesterday).
    Im trying to write a custom clodFusion tag in java that gets the width, height, size and MIME types of a given file. I?ve been trying to get it to work on the command line first. I can get the width and height but cant get the size and the MIME type.
    Here is what I got
    /*import com.allaire.cfx.*;*/
    import java.awt.image.renderable.*;
    import javax.media.jai.*;
    import com.sun.media.jai.codec.*;
    import java.io.*;
    import java.util.*;
    public class ImageInfo {
    private RenderedOp image = null;
    private RenderedOp result = null;
    private int height = 0;
    private int width = 0;
    private String type = "";
    private String size = "";
    public void loadf(String file) throws IOException
    file = "80by80.jpg";
    FileSeekableStream fss = new FileSeekableStream(file);
    image = JAI.create("stream", fss);
    height = image.getHeight();
    width = image.getWidth();
    System.out.println(height + "\n");
    System.out.println(width);
    System.out.println(type);
    public static void main(String[] args) throws IOException {
    ImageInfo test = new ImageInfo();
    test.loadf(args[0]);
    can anyone please help me out to modify the above so I can also print the mime type and the file size to screen.
    thanks for any help

    any suggestions?

  • XML Parser and Content-type/encoding problem

    I've write a little and simple XML parser and a simple "trasformer" that recive an XML file and an XSL one and return HTML, here is the code:
    public static String toHTML(Document doc, String xslSource){
            ByteArrayOutputStream testo = new ByteArrayOutputStream();
            try{
                DOMSource source = new DOMSource(doc);
                TransformerFactory tFactory = TransformerFactory.newInstance();
                System.out.println("----> " + xslSource);
                Transformer transformer = tFactory.newTransformer(new StreamSource(xslSource));
                transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
                transformer.setOutputProperty(OutputKeys.METHOD, "html");
             transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
             transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
                transformer.transform(source, new StreamResult(testo));
            }catch(Exception ioe){
                System.out.println("2 XMLTool.toHTML " + new java.util.Date());
                System.out.println(ioe);        
            return testo.toString();
        }the problem is that I would like to put the HTML code its return into a JEditorPane; now I'm trying with this code:
    JEditorPane jep1 = new JEditorPane();
    jep1.setContentType("text/html");
    jep1.setText(v);
    // 'v' is the string returned by the code posted up (the XML/XSL transformer)but I can't see anything in my JEditorPane.
    I think that the problem is this line of code that the transformer add automaticaly ad HTML code:
    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">Infact if I try to delete this line from the code I can see what I want but is'n good delete a line of code without understend where is the problem.
    So, can anyone help me?

    good.
    when u set ur output properties to html , transformer
    searches for all entity references and converts accordingly.
    if u r using xalan these files will be used for conversion of
    Character entity references for markup-significant
    output_html.properties
    (this should be in templates package)
    and HTMLEntities.res(should be in serialize package)
    vasanth-ct

  • Document Sets and Content Types

    Hi All,
    I am having trouble in getting the "document sets" content types applied as expected when I try to create a site based off custom template.
    Scenario:
    We have 8 document sets stored in a document library. This library is part of a site which we have saved as a template.
    E.g. of document sets is "Others", "Meetings" etc
    Each of these document sets have one or more content types associated with it.
    We are trying to create a site based off the saved site template using powershell.
    E.g. $web = New-SPWeb http://myserver/sites/mysite/subsite
    $web.ApplyWebTemplate("{GUID}#Name of Template")
    When we open the document sets in this newly created site, the content types seem to be coming all together rather than being associated with the specific document set.
    E.g. Clicking "New document" in the "others" document set would show up content types from "meeting" and all the remaining document sets present in that library.
    Interestingly, when I go to "Document Set" settings, I only see the content type of "Others" Document Set.
    Any idea why the "New document" dropdown for the document set is not behaving as expected?

    Hi Abhi,
    Based on your description, I did a test. In my testing, everything worked well.
    The steps are:
    Go to Site Actions->Site Settings->Site content types.
    Create a new content type, and select parent content type from Document Set Content Types, and Parent Content Type: Document Set
    Click ok
    Under Settings, click Document Set settings
    On the Allowed Content Type section, select some content types and add them
    Click OK
    Then repeat step2-6, and create another custom document set
    Open your library, and allow management of content types in advanced settings
    Add the two document sets into the library
    Check each document set, and each one had different content types
    Save the site as a template and include the content
    Create a new site based on the site template using PowerShell(the command was same with yours)
    After creating, check the document sets of the library in the new site, everything worked well.
    Please check your process as the above steps.
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Managed Metadata Service and Content Type Hubs - Service Connection necessary?

    I created a site collection and activated the content type hub feature at the site collection level. We have an existing managed metadata service but I am unable to edit its settings, so I created a new MMS in a new database, however; there is no "service
    connection" row below the MMS row for the new MMS Application, but there is one for the old MMS Application. Will this still work with my content type hub? If not, how can I get the service connection setting/row? I have to do this via PowerShell since
    the menus in the ribbon are not usable due to our JavaScript settings...

    Are you using Custom claim provider??
    If you are then try this:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/120ab535-63d2-4205-a51f-1987e9c0cf79/sharepoint-fba-the-content-type-texthtml-charsetutf8-of-the-response-message-does-not-match-the
    http://www.chapmanconsulting.ca/post/2010/04/23/The-Case-of-the-Failing-SharePoint-2010-FBA-Configuration.aspx
    #RoHsTr

  • How to set RelationshipDeleteBehavior on a list using a site column and content type programatically CSOM c#

    On Prem development machine, I'm writng a deployment routine in c# using the client object model.  I've created some site columns of type Lookup, I've created a content type and added those lookup columns to it and I've created a list using the
    content type.  I want to set the RelationshipDeleteBehavior property on some of the lookup columns in the list.  I'm also using the 16 assemblies.
    List list = cc.Web.GetListByTitle("MyList");
    cc.Load(list);
    cc.ExecuteQuery();
    Field f = list.Fields.GetByInternalNameOrTitle("MyLookupField");
    cc.Load(f);
    cc.ExecuteQuery();
    (f
    as
    FieldLookup).RelationshipDeleteBehavior =
    RelationshipDeleteBehaviorType.Restrict;
    f is returning as a Field but (f
    as
    FieldLookup) is returning null here.  Any insight on this?
    Thank you.
    Dan Budimir

    Hi,
    We can use SP.ClientContext.castTo method to convert the field to lookup field . The following code snippet for your reference:
    ClientContext context = new ClientContext("http://siteurl");
    NetworkCredential credentials = new NetworkCredential("username", "password", "domain");
    context.Credentials = credentials;
    Web web = context.Web;
    List list = web.Lists.GetByTitle("MyList");
    Field field = list.Fields.GetByInternalNameOrTitle("MyLookupField");
    FieldLookup lookupField = context.CastTo<FieldLookup>(field);
    lookupField.RelationshipDeleteBehavior = RelationshipDeleteBehaviorType.Restrict;
    lookupField.Indexed = true;
    lookupField.Update();
    context.ExecuteQuery();
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Exception in encoding and content type

    Hello everyone,
    I am using JavaMail API 1.1.3 to download mails from POP3 servers. The application seems to be working fine except when I am seeing the following entries in the message header:
    1) Content-Transfer-Encoding: 8bits
    Exception -- Unknown encoding: 8bits
    2) Content-Type: text/plain;
         charset="utf-7"
    Unsupported encoding exception -- utf-7 [could not load class sun.io.ByteToCharutf-7]
    3) Content-Type: text/plain;
         charset="koi8-r"
    Did anyone encounter this before and/or have a resolution? Appreciate if you can share if there is a fix.
    Thanks in advance.

    By default, getContent() will return decoded text. But,some mail server will put 8bits instead of 8bit. Javamail will throw exception when encoding is "8bits". In that case, you will have to decode the message by yourself, force using "8bit".
    Part 2 & 3 of the problem - it is not able to find the character set support.

  • Picture library and content types

    Hey,
    I have created a Picture library in SharePoint.
    Now I want to add a custom content type to picture library.
    SPSite oSite = new SPSite("http://
    SPWeb oWeb = oSite.OpenWeb();
    SPList oList = oWeb.Lists["Picture"];
    SPContentType oDocContentType = oWeb.AvailableContentTypes["Stefan Picture"];
    oList.ContentTypesEnabled = true;
    oList.ContentTypes.Add(oDocContentType);
    oList.Update()
    But this code adds 2 content types to the picture library (picture and Stefan picture). What I can do so only the content type Stefan Picture will be added to the document library?
    Thanks for your help
    Stefan

    Thanks Samuel for your help.
    When I delelte in the schema.XML the contenttype attribute and set
    ContentTypesEnabled=false
    then will be (after run the code
    SPSite oSite = new SPSite("http://
    SPWeb oWeb = oSite.OpenWeb();
    SPList oList = oWeb.Lists["Picture"];
    SPContentType oDocContentType = oWeb.AvailableContentTypes["Stefan Picture"];
    oList.ContentTypesEnabled = true;
    oList.ContentTypes.Add(oDocContentType);
    oList.Update()
    in an event receiver) only one content type shows up in the new button.
    Regards
    Stefan

  • Help on Approval Workflow and content types

    Hi
    So here is my question hope you guys can help!
    So i was setting up a workflow for a leave request form. Everything was fine and I had the Approve/Reject buttons at the bottom of the task EditForm. Now I copied the content types to a new one and changed the Optional settings (lets says title hidden %
    completed hidden etc) and then I changed the Task content type too so as to allow for that new content type to take place. Then i relaunced the workflow everything worked nicely the form look the way I wanted it but then on the EditForm I didnt have the ebuttons
    any more so I found it odd so I reset the content type to the original checked that everything was back in place (the hidden back to optional etc) and even on the original Workflow Task (Sharepoint2013) content type the buttons disapear now I have to manually
    add to the completed column and change the drop down menu of the Task Outcome to approved or rejected to make the workflow spit out the results.
    I was wondering what happened I do not understand it. I even deleted all the Task List and Lists associated witht the workflow re wrote the workflow and nothing... So i m a bit out of my depth.'
    When I click on the Cutomized List Default Edit Form... I do get the form with the button but its not the same one I get with the Email Link or the Link and the actual List
    Any pointers?
    I appreciate it!

    Hi  ,
    According to your description, my understanding is that the outcome buttons disappear after you change the Optional type column in Workflow Task(SharePoint 2013)  content type.
    For your issue , please make sure the Task Status and Task Outcome type columns are existing in the content type in order for the custom outcome buttons to appear.
    For more information, you can refer to the blog:
    http://blogs.msdn.com/b/sharepointdesigner/archive/2012/09/14/how-to-manipulate-the-task-form-with-sharepoint-designer-for-new-task-actions.aspx
    As your original demand is setting up a workflow for a leave request form, here is a great blog you can have a look:
    http://jamilhaddadin.com/2011/12/03/implementing-workflow-using-infopath-2010-and-sharepoint-designer-2010/
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Image Size and File Type

    For image files we should be able to see the size of the image in inches in the details section.
    Also for any file, we should be able to quickly see the exact file type (Illustrator CS document or Illustrator CS2 document), not just "Illustrator document" which is absolutely useless.

    Stan,
    You can see the file type by hovering over the file in Library view and it will show the file name followed by the extension like jpg, nef or tiff.
    Alternatively in library mode go to grid view it will pixel size of the files as well as the name of the file withthe format.
    If you are not able to see that go to View>View Option.
    Check the option show header with label
    Hope thatt helps.
    Mandhir

  • Image Field and Blob Type

    Hi!
    I´m working on form that will works lika a image database.
    In my table I store the imagens in a blob type column.
    In my form, I use a Image Field to display the imagem from database.
    It works.
    Now I want to generate a md5 hash for the image file, so I createa function that receive a blob variable
    and calculates the md5 hash.
    That works too.
    The problem is that I want to get the hash at runtime, right after the file is chosen.
    So I did this:
    wfilename := WEBUTIL_FILE.FILE_OPEN_DIALOG (wdirname, NULL, file_types_variable);
    wmd5    := my_functions_package.md5(my_file => :data_block.image_field);
    When I try to compile, I get the error: Bad bind variable 'data_block.image_field'
    I guess the forms doesn´t see the image_field as a blob even if it is.
    Some one know how can I work arround this? To get the image_field as blob (It already is at database).
    Forms [32 Bit] Version 9.0.4.0.19 (Production)
    Oracle Database 10g Release 10.2.0.3.0 - 64bit Production
    Thanks.

    hi
    try something like this.
    declare
          f varchar2(100);
    begin
         f := webutil_file.file_open_dialog();
         if f is not null then
              :block.item := f;
              end if;
         end;or try the following code.
    declare
    l_file_name varchar2(383);
    begin
    l_file_name := webutil_file.file_open_dialog( );
    if
      l_file_name is not null
    then
      if
        :block.rowid is not null
      then
        create_record;
      end if;
      client_image.read_image_file ( l_file_name, substr ( l_file_name, instr ( l_file_name , -1 ) ), 'block.item' );
    end if;
    end;sarah
    Edited by: QGIRCO on Jan 20, 2010 8:51 AM

  • Image content type in Site Asset Image library: The Preview and Thumbnail Preview columns do not display the picture of the item.

    I have two different Site Asset libraries.  The Site Asset Picture library has items of
    content type picture.  The Site Asset Image Library has items of
    content type image. 
    1) I do not quite understand the different between a picture content type versus an image content type. 
    2) the thumbnail and preview columns do not display the image in the Site Asset
    Image Library.  (the image does display in the thumbnail column of the Site Asset Picture library.)  I expected the image to display in the Site Asset Image Library the same as it does in the Site Asset Picture library. 
    Why doesn't it?
    Betty
    Betty Stolwyk

    I have subsequently found out that our "Site Asset Images" library is a Document Library to which someone must have replaced the Document content type with an Image content type.  I also found out that picture previews/thumbnails cannot be displayed
    in Document libraries.  So the problem was the library type, not the content type.
    So I simply created a new Picture Library (whose content type = picture) and copied the files into that and the thumbnails displayed just fine!
    I bet what led to this is the default "Site Assets" library that is created for a new Team site.  It is just a document library but sounds very similar to the "Assets" library.  I can imagine someone thinking the "Site Assets" library was a standard
    container for images, and simply changed the name to better identify the content! 
    As far as 'image' vs 'picture' content types, I noticed that a new Picture Library contains a content type of 'picture', but an Asset Library contains a content type of 'image' (as well as audio and video).  Although the 'image' content type has a few
    more fields than the 'picture' content type (picture content type does not have thumbnail), the actual Picture Library contains pretty much all the same fields, including the thumbnail.  So for all practical purposes, either library type can be used for
    storage of pictures.  I am guessing that the Pictures Library which uses the picture content type is for backwards compatibility purposes, and that the 'image' content type is newer, being derived from the new "Rich Media Asset" content type and used
    in the new Asset Library which can hold audio and video in addition to pictures.  
    Microsoft Help also mentioned that a Picture Library has a slide view which an Asset library does not.  So my take on that is that if you want the potential of seeing your pictures as a slide show, put them in a Picture library which is still using
    the 'picture' content type of previous SharePoint versions.  If you want to keep pictures organized with audio/video files, then put them into an Asset library which uses the  'image' content type derived from the new Rich Media Asset content type.
    Betty Stolwyk

Maybe you are looking for

  • Newbe question about SG300-20 dropping port to Router

    Hello to you all Today I received my new SG 300-20 managed switch to replace an unmanaged switch with some faulty ports. I want to use it in a a combined Home / Small Office environment. It is my first purchase and use of a managed switch so am still

  • Adapter Module error

    Hi, I made some code changes to a file adapter module code which was working fine [ before the changes were made]. After making the changes and redeploying the adapter module 'am getting the following error in the RWB communication channel monitoring

  • AE 7.0 renders incomplete movie

    I am using AfterEffects 7.0 on a Macbook Pro, with Snow Leopard on MAC OS X 10.6.3.   AfterEffects will fail in the middle of a render and show an error message in the middle, saying that it "cannot create 720 x 480 image buffer - 7 :: 39."  It will

  • My imac has died I don't know what to do

    I'm, not the best of mac users, but all I can say is, I've had my mac for 14 months, and the waruntee has ended, apple where ment to send us a letter to remind us to reknew it. My screen has gone crazy, I don't know if it is the screen or the video c

  • How to move page from One workspace to another workspace

    I have a production web site in one workspace and a development web site in another workspace. I want to move a page(not all) from production workspace to development workspace. How to achieve it? Thanks for your help.