Mapping xml for uploading file

hi everyone.
i am in big problem here. for the last couple of days i have been trying to upload a file in my project but cant get through. i am using HTML and servlets to do the upload.....my system is on java 1.4 and tomcap 4.0
at first i did try to use jakarta common upload, but i couldint get the set up correct..... i kept on getting a compile error that the package couldint be found.....so i went for com.oreilly and copied the cos.jar on the common\lib, then took one of the source codes which compiled well.
so i tried to upload a file but failed again, it displayed an error that the directory Tmp not found, so i changed the directory to c:\tmp on the servlet... like this:
MultipartRequest multi =
        //new MultipartRequest(req, "/tmp", 50 *1024 * 1024,
        new MultipartRequest(req, "C:/tmp", 50 *1024 * 1024,
          new com.oreilly.servlet.multipart.DefaultFileRenamePolicy());after changing the dir, this is the new error that i am getting now.
java.io.IOException: Posted content type isn't multipart/form-data
     at com.oreilly.servlet.multipart.MultipartParser.(MultipartParser.java:166)
     at com.oreilly.servlet.MultipartRequest.(MultipartRequest.java:222)
     at com.oreilly.servlet.MultipartRequest.(MultipartRequest.java:151)this is the web.xml i got on my web-inf\web.xml
<?xml version="1.0" encoding="UTF-8" ?>
  <!DOCTYPE web-app (View Source for full doctype...)>
- <web-app>
- <welcome-file-list>
  <welcome-file>/documentation/index.html</welcome-file>
  </welcome-file-list>
  </web-app>form
out.println("<form method = \"post\" action = \"http://localhost:800/servlet/UploadTest\">");
   out.println("<h3><p align="\" center\"">File Upload</h3><br>");
   out.println("<form action=\"uploadTest\" method=\"post\" enctype=\"multipart/form-data\">");
   //out.println("<td>file Name :</td><td><input type=\"text\" name=\"lname\" size=\"40\"></td></tr>");
   out.println("<table><tbody><tr><td><input type=\"file\" name=\"file1\" /></td></tr><tr><td>");
   out.println("<input type=\"submit\" value=\"Submit\" /><input type=\"reset\" value=\"Reset\" /></td></tr>");
   out.println("</tbody></table></form></body></html>");my questions are:
1). from the com.Orreilly web site, they dont say if i should change the web.XML file.... do i have to edit it to map the oreilly upload package, coz i tried it and i got an error on the tomcat command window
2). do i have to creat the tmp directory manually.
3). is there an easier why to upload files to database.
i would highly appreciate any help, i got 6 days to save my 3 years in uni....please help.
thnx in advance.
Edited by: nicknick on Apr 18, 2008 12:46 PM

hi,
thenx again for your wonderful help.
i am still struggling with the upload part, but i feel i am on the right track. my servlet is compiling well but wen i run it, i am getting an error "*HTTP Status 404 - /servlet/null*".
i am using java 1.4, apache tom cat 4.0 and i did install the jakarta commons fileupload (which i droped commons fileupload.jar and commons io.jar under .../common/lib) and set the path to them as well.
i am using this source code from this web site to do the upload....*http://www.docjar.com/html/api/org/apache/commons/fileupload/FileUploadBase.java.html*
and i am using this servlet with the form to call it.
out.println("<form method = \"post\" action = \"http://localhost:8800/servlet/FileUploadBase\">");
out.println("<h3><p align=\"center\">File Upload</h3><br>");
   out.println("<form action=\"uploadTest\" method=\"post\" enctype=\"multipart/form-data\">");
   //out.println("<td>file Name :</td><td><input type=\"text\" name=\"lname\" size=\"40\"></td></tr>");
   out.println("<table><tbody><tr><td><input type=\"file\" name=\"file1\" /></td></tr><tr><td>");
   out.println("<input type=\"submit\" value=\"Submit\" /><input type=\"reset\" value=\"Reset\" /></td></tr>");
   out.println("</tbody></table></form></body></html>");i feel like my problem is on the web.xml which i am not sure(its located on ....webapps\ROOT\WEB-inf\web.xml). this how it looks like
<servlet>
     <servlet-name>FileUploadBase</servlet-name>
     <servlet-class>fileupload.FileUploadBase</servlet-class>
</servlet>
<servlet-mapping>
     <servlet-name>FileUploadBase</servlet-name>
     <url-pattern>/classes/FileUploadBase</url-pattern>
</servlet-mapping>general information:
1) the servlets are in .../webapps/root/web-inf/classes
2) i want the uploaded files be stored in a database under c:/ or in a folder c:/tmp
3) commons jar are under common/lib
i will highly appreciate any help you give. thenx

Similar Messages

  • Sender file adapter - Can I use *.xml for the file name

    Hi Gurus,
    I have some interfaces where I need to pick the file from a directory. The name of the file will have Data<i>time stamp</i> as the naming convention. Can I use *.xml to pick up my files from this directory?
    The help.sap.com documentation says that we can use this naming convention.
    <b>
    &#9679;      File Name
    Specify the name of the file that you want to process. The name can contain placeholders (*, ? (placeholders for exactly one character)) so that you can select a list of files for processing.
    </b>
    I tried using *.xml for my file name in the communication channel, XI is not picking up this file.
    Please let me know if you have the solution.
    Thanks
    Kalyan

    Murthy,
    Thanks for the reply.
    I am using GuildFTP tool as my FTP server. In this tool, all the permissions were given for the file to pick up.
    The status of the file is good.
    Where in the file adapter configuration I have to select 'Read-only'?
    The file adapter is working perfect with the exact name of the file.
    Thanks
    Kalyan

  • Is there a size limit for uploading files?

    is there a size limit for uploading files?

    You have max 20GB storage.
    Upload anything you want up to that limit - be it one file or many.
    The only limit after that is the speed of your internet connection since extremely large files can take hours to upload.

  • Can i development program with EDK for uploading file to server?

    Can I development program with EDK for uploading file to server?How to avoid same name of files?
    Thanks!

    Hi ,
    thanks for the quick response.
    but the problem is supppose i have a excel sheet with 16 rows and 13 columns(so data).
    i am placing this file contents to appserver USING ABOVE fm.
    after that i am reading the file from appserver to create SO(idoc),i need  1row-3column data and 2row-2c data.like that.
    in unix we will get row data(after uploading to app server) as #mprn#2345# like this so easy to separate when reading.but in  MS NT OS 1row data getting stored in different rows in Appserver.so difficult to read.
    so the above mentioned FM is OS dependent or is there any way (any other FM) to get same kind of data in different OS.
    PLEASE SUGGEST OTHER WISE I NEED TO CODE BASED ON OS.
    REGARDS
    SARATH

  • Ejb-jar.xml for  a file adapter in 710

    Hi,
    we moved our file adapter from 700 to 710. Now there is a problem in ejb-jar.xml. There are entries like this:
    <session>
    <description></description>
    <display-name></display-name>
    <icon/>
    <ejb-name>FileActConversionToSWIFTModuleBean</ejb-name>
    <home>com.sap.aii.af.lib.mp.module.ModuleHome</home>
    <remote>com.sap.aii.af.lib.mp.module.ModuleRemote</remote>
    <local-home>com.sap.aii.af.lib.mp.module.ModuleLocalHome</local-home>
    <local>com.sap.aii.af.lib.mp.module.ModuleLocal</local>
    <ejb-class>com.sapcons.xi.swift.FileActConversionToSWIFTModuleBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    The error messages are like this:
    Bean Interfaces: stateless bean "FileActConversionToSWIFTModuleBean" should have at least one of the following interface pairs: "local" and "local-home", "home" and "remote" or service endpoint interface
    Bean Interfaces: The home interface "com.sap.aii.af.lib.mp.module.ModuleHome" cannot be found in the search path.
    What is wrong? The interfaces ModuleHome etc. seem not to be here any more. Which interfaces should be entered in ejb-jar.xml for release 710?
    Thanks and regards, Marina

    Hi,
    yes, there is a module for file adapter. Some modifications were implemented, too. I can imagine that something was forgotten. It is possible to do the build, to deploy and to test the adapter, even if there are errors in ejb-jar.xml .
    Is there a list which things that changed between 700 and 710? 
    I have these 2 links with useful information:
    [Developing Adapters and Modules|http://help.sap.com/saphelp_nwpi71/helpdata/en/8b/895e407aa4c44ce10000000a1550b0/content.htm ]
    [Javadoc PI 7.1 (Adapter, Module and Mapping Development)|http://help.sap.com/javadocs/pi/SP3/xpi/index.html]
    Is there further information for this topic?
         Thanks and regards, Marina

  • Remove link for uploaded files in application

    Hi all,
    I've been following the tutorial on how to upload and download files in application at http://download-uk.oracle.com/docs/cd/B32472_01/doc/appdev.300/b32469/up_dn_files.htm. I have now created my own table which stores the uploaded files and can download them successfully. I would now like to add the ability to delete these files within the application and was wondering what the best way of doing this was?
    I would like to add another column to the displayed report with a 'Remove file' link for each listed file, which when clicked would delete the file from the table. I've already tried using a similar method to the one used to upload the files (instead of uploading the file, the called procedure deletes it from the table using the specified ID), but this causes the application to display a blank page when the link is clicked, which I dont want (but does delete the file).
    I would appreciate any suggestions.
    Regards,
    Dave

    Dave,
    See the login page:
    http://htmldb.oracle.com/pls/otn/f?p=31517:101
    There are details on how to access the application builder, where you can see how the
    setup of that download, delete, upload application has been done.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Program for uploading file on application server...

    Hi,
    I have created a program to upload a file from presentation server (local desktop) to application server. But in this program I have to specify the file length. What should I do in given program so that I can upload file of any length on application server ?
    *& Report  Z_FILE_DOWNLOAD_TO_APP_SERVER                               *
    * This Program can be used to move flat files to application server from presentation server.
    REPORT  Z_FILE_DOWNLOAD_TO_APP_SERVER.
    PARAMETERS: P_FILE       LIKE IBIPPARMS-PATH,
               P_FILE1(20000) default 'E:CONVERSIONFLAT' lower case.
    DATA: WS_FILE TYPE STRING.
    DATA: BEGIN OF T_DATA OCCURS 0,
           RECORD(20000),
         END OF T_DATA.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
    IMPORTING
      FILE_NAME           = P_FILE
    START-OF-SELECTION.
    WS_FILE = P_FILE.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
       FILENAME                      = WS_FILE
      FILETYPE                      = 'ASC'
    TABLES
       DATA_TAB                      = T_DATA
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    * Creating the file at Appl server............................
    OPEN DATASET P_FILE1 FOR OUTPUT IN TEXT MODE encoding utf-8.
    if sy-subrc ne 0.
    message e000(--) with 'Error in opening file'.
    endif.
    * Trasfer the records to file.............
    loop at t_data.
    transfer t_data to p_file1.
    endloop.
    close dataset p_file1.
    if sy-subrc eq 0.
    write: / 'Written the files at ', p_file1.
    write:/ 'Goto AL11 Transaction and then click on SAP Directory DIR_SAPUSERS to look for the file'.
    endif.
    Please advice.
    Regards,
    Rajesh

    Try declaring it as TYPE STRING. Not sure though.
    There are two predefined types in ABAP with variable length:
    STRING for character strings
    XSTRING for byte strings
    Thanks,
    SKJ

  • Here's a fix for uploaded files that won't play.

    Is this you?  You've found a lot of files were uploaded, instead of matched.  Some of those files might even be on albums where other tracks matched. Sure you want them ALL to match, but meantime, it would be nice if uploaded files would actually play!  Sure, you can see their names, track durations, etc. but if you try to play them directly, nothing happens and if you try to play an album through, when it gets to an uploaded track, it stalls or skips past it.  You've checked the file type and it's an AAC so you figure it can't be a file encoding incompatibility problem and besides, whatever the file type, Apple is red-flagging anything incompatible, tells you it's ineligible, right?
    Guess Again - not all AAC files are produced with the same encoder and some of them, while they'll get past Apple's eligibile/ineligible screening process, probably shouldn't.
    I routinely record vinyl using Audacity and at various times I've used different encoders (not that I knew it until now).  As a result of checking which uploaded files play and which do not, I'm pretty confident of the following. While some AAC files created outside of iTunes might work, those encoded using Lavf52.36.0 will not.  Neither will files encoded using Lavf52.64.2.  There may be others.
    So what's the fix?  The same one recommended for getting files flagged by Apple as ineligible to pass muster.  You need to make an AAC copy in iTunes and swap that for the uploaded files that won't play.
    Here are the steps I use to get it done. You may be able to streamline the process though.
    (1) Turn off wi-fi to prevent iTunes Match from attempting to match any new files until you're good and ready.  If you don't to this, you may end up with files you've just created being flagged as duplicates.
    (2) Select all files in an album that has some bad uploaded files. Select Advanced > Create AAC Version.  (NOTE: I don't bother trying to separate uploaded from matched, just too much hassle.)
    (3) Select one of the files, so you can File > Reveal In Finder. Generally this will get you to the album folder that includes both sets of tracks.  The ones you just created will have a "1" in the file name.
    (4) Create a folder on the desktop and move all the newly created files to it.  Delete the "1" from the file names.  Name the folder based on album title.
    (5) In iTunes, delete the listings for the newly created files.
    (6) Turn on wi-fi and wait for iCloud to reconnect.  Watch the cloud icon - it'll tell you.
    (7) Delete the album from iTunes (You're now getting rid of the copy that was originally uploaded, so be sure you've really got the new AAC files handy to replace them with).  Note you will see an option to delete from iCloud too.  Check it.  You want these files GONE!
    (8) Select Store > Update iTunes Match. If you do a search for the album from an iCloud enabled iOS device (I use Apple TV) after the update is completed, you shouldn't be able to find the album.
    (9) Select File > Add To Library and go get the folder of tunes you created.
    (10) Run Update iTunes Match again.
    (11) Watch the iTunes progress bar. Once the matching process has checked to see if you've added anything to your library, you'll see fresh copies of your songs uploading.
    (12) As another means of confirmation, once several of the songs have uploaded, do an iOS device search for the album. You should  be able to get the album to appear before the upload is complete. You may have to back out of the search and back in to get it to work, but chances are when you first see the album, the song titles will all be grayed out.  Once the update is complete, give it a minute and everything should become available to you.
    (13) Pick a track that wouldn't play before and watch to see if the timer starts to move, followed by music! It is now time to do a little happy dance.
    I know this is a far cry from figuring out what it takes to get songs that should match to actually do so, but that's a whole different ball of wax.

    Thanks this was useful. I have been ripping my audiobooks and I was finding that they would get uploaded to iCloud in the process, which in itself was fine, but then iTunes would not let me change the media type to Audiobook, which is annoying as it effects how iTunes treats the media. Like showing you the skip back 10 seconds button.
    The general outline here helped me work around the issue and change the media type before the media was re-uploaded to iCloud.
    Sean

  • How to get built.xml for ear file in jdeveloper?

    Hi,
    I am using JDeveloper to create EAR file for my ADF Fusion Application. I think Jdeveloper use ant to create EAR file. I know how to get built.xml for my war file.
    Can anyone tell how to get that built.xml that create EAR file in Jdeveloper.?

    This blog explains:
    http://adfhowto.blogspot.com/2011/03/ojdeploy-deploying-adf-application-from.html
    Based on the blog, I simply copied an existing project "deploy" target definition and augmented the project's build.xml with a new target "deployApp" that omits the Project parameter to ojdeploy. This causes ojdeploy to build the workspace-level deploy profile instead. I also omitted the output directory parameter (default is app's /deploy folder) and assume that there is only one application deployment profile (i.e. the default for profile parameter is the '*' wildcard). You can augment the build.properties file if you need to get fancier than that.
    <target name="deployApp" description="Deploy Complete YourFoo Application"
    depends="init">
    <taskdef name="ojdeploy"
    classname="oracle.jdeveloper.deploy.ant.OJDeployAntTask"
    uri="oraclelib:OJDeployAntTask"
    classpath="${oracle.jdeveloper.ant.library}"/>
    <ora:ojdeploy xmlns:ora="oraclelib:OJDeployAntTask"
    executable="${oracle.jdeveloper.ojdeploy.path}"
    ora:buildscript="${oracle.jdeveloper.deploy.dir}/ojdeploy-build.xml"
    ora:statuslog="${oracle.jdeveloper.deploy.dir}/ojdeploy-statuslog.xml">
    <ora:deploy>
    <ora:parameter name="workspace"
    value="${oracle.jdeveloper.workspace.path}"/>
    <ora:parameter name="profile"
    value="${oracle.jdeveloper.deploy.profile.name}"/>
    <ora:parameter name="nocompile" value="true"/>
    </ora:deploy>
    </ora:ojdeploy>
    </target>

  • ProgressBar For uploading File, C#

    How Can I make a ProgressBar for uploading/downloading file to/from DataBase using
    C#??
    Desktop Application

    Try declaring it as TYPE STRING. Not sure though.
    There are two predefined types in ABAP with variable length:
    STRING for character strings
    XSTRING for byte strings
    Thanks,
    SKJ

  • Performance isues for uploading file

    Hello -
    Has anyone hit any performance issues when uploading files, using the obj.setSource('HTTP'...) method?
    Seems like all the examples I've seen have to call the "upload" procedure one time per upload. That is, unless you know haead of time that you have 3 documents to upload, then you can put 3 update statements within the procedure.
    But if you don't know ahead of time how many files a user is going to upload, are we stuck then calling the "upload" procedure once per file (say if a user wants to upload 5 files, the the "upload" procedure has to be called 5 times, once per file).
    Will this cause a major performance hit, or will it be OK because the procedure is already compiled and loaded in the SGA so it can be run multiple times by multiple users?
    I hope that makes sense. Thanks for any input

    hi ST,
    1   http://www.sap-img.com/financial/sap-fi-transaction-code-list-1.htm
    2  http://www.sap-img.com/general/easy-to-remember-transaction-codes.htm
    3  http://www.4soi.de/transactions-f-h.php
    4 http://www.saptransactioncodes.com/search
    5 http://www.sap-img.com/financial/sap-fi-transaction-code-list-2.htm
    6 http://www.sap-img.com/financial/some-important-tcodes-for-fi-gl-ar-ap-asset.htm
    Hope this will helps u .............
    Ranjit

  • Interface Mngr: Option for Uploading file from presentation or unix server

    Hi all,
      I want to upload file through interface manager where the file can be on the presentaion server or the unix server. How do i achieve the same? I need to create parameters for 'Filename' and 'Unix Filename'. Either of the 2 will be chosen at a time. But how do i retrieve the respective file?

    Hi!
    For handling a file on the apllication server (unix), you have to use the OPEN DATASET, CLOSE DATASET commands.
    For handling the files on the presentation server (local PC), you have to use the upload/download method (GUI_UPLOAD, GUI_DOWNLOAD function elements).
    You can make 2 parameters in your ABAP program like this:
    PARAMETERS: p_f_app LIKE rlgrap-filename.
    PARAMETERS: p_f_pre LIKE rlgrap-filename.
    both is filled - error
    IF NOT p_f_app IS INITIAL AND
    NOT p_f_pre IS INITIAL.
    MESSAGE E001(ZERROR).
    ENDIF.
    both is empty - error
    IF p_f_app IS INITIAL AND
    p_f_pre IS INITIAL.
    MESSAGE E002(ZERROR).
    ENDIF.
    IF NOT p_f_app IS INITIAL.   "application server
    open dataset...
    ENDIF.
    IF NOT p_f_pre IS INITIAL.   "presentation server
    call function 'gui_upload'...
    ENDIF.
    Regards
    Tamá

  • Minimum filesize for uploaded file?

    One of the people in our department who is helping with course/content creation has brought up an interesting problem:
    For various reasons, up until now we have fed various pieces of video to our campus via a QT streaming server. Usually, we will embed a very small reference movie (usually around 4k) on a web page or in Blackboard. The reference movie will then kickstart the video stream. We have done this via podcasting in iTunes as well with success. When my colleague tried uploading one of the reference files into iTunesU, it acts as if it uploads, but will respond with a message stating : "0.00 of 0.00MB transferred" and the file never appears on the track list as it should. Other, larger files are uploading fine.
    So, my question is this:
    Is there some some sort of minimum size for an uploaded file? Is 4KB too small?
    and
    as a follow-up, will our stategy of using reference movies work within iTunesU? We know that the end-users will not be able to download the full video files.
    Thanks all
    Eric
    Dual 2GHz G5   Mac OS X (10.4.6)  

    One alternative you might consider is using a link on
    the iTunes U page. You could link to a page with the
    stream or to the stream itself with an http url.
    Links allow you to access any related content via a
    web browser.
    That is an option, but the idea here is to encourage the use of iTunes U to faculty and students as a media portal, and to encourage the use of iTunes in general. So basically, what I'm trying to accomplish is to argue why this needs to be a feature, instead of disabling it.
    I'll gladly argue the point with anyone that wants to take the side of the iTunes application NOT being a media player. I love Apple products, and I cringe at the notion of forcing our users to use Real to access academic streaming content from our Quicktime Streaming Server.
    It just doesn't make sense to force them to get some media files one way (using the "Get Song" button), and some (also Quicktime files) using a different metaphor. In fact, it goes against the metaphor of the entire iTunes Music Store interface of simply clicking the "Get" button to acquire the content.
    If the service only goes half way, there is little point in creating links on the iTunes U page linking back to a page referencing the streaming media. We (IT services on our campus) want to encourage the use of iTunes U, but why should we have users go to iTunes U to download the content when we could just post the links and content we would otherwise post within iTunes U within Blackboard, or as a podcast.
    Last fall we hosted a live event that we made accessible via our Quicktime Streaming server. I embedded a reference .mov file into one of our podcast feeds in iTunes (not iTunes U) so users could watch the even live within iTunes. Streaming... So it can be done. But iTunes U specifically prevents this format of a Quicktime .mov file from being uploaded.
    It would make my job much easier to advocate the use of iTunes as our campus media portal.
    Mark Leaman
    New Media Consultant
    Bowdoin College
    Brunswick, Maine
    207-725-3512
    17" iMac G5   Mac OS X (10.4.7)  

  • Java code sample for uploading file

    Guys can some one give me a java code sample for uploading more than 1 file .
    I have a working example but that is only for one file.
    thanks
    M

    Throw it away. Go to the [http://commons.apache.org/fileupload] and carefully read both 'User Guide' and 'Frequently Asked Questions' sections.
    And please, please also carefully read this article: [http://balusc.blogspot.com/2008/06/what-is-it-with-roseindia.html].

  • GP: Creation of process for uploading file with approval or a rejection

    Problem: It is necessary to organise process of uploading files in KM repository with approval or a rejection.
    I have created process with two callable objects.
    1. File Input
    2. Interactive Form/File Approval
    Has grouped structure "File"
    In Runtime, during object performance "Interactive Form/File Approval" there is an error:
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: pdfSource of InteractiveForm UI element should be populated with pdf binary content in USE_PDF mode
    It is one problem, the second problem consists in that how to organise a folder choice where the file will be loaded.

    Hi Pustovoytov Stanislav ,
    Check whether if the context attribute pdfsource is of binary type or any other type. It sbould be of binary type.
    And about the second one you can organize the folder structure in the KM administration.
    Thanks
    Satya

Maybe you are looking for