How to upload files (.doc./.pdf) to the database?

Hello,
I know this question was raised several times before but the answers don't really make me happy.
I have a table with a BLOB-column for the documents (different mime-types) and a varchar2(100)-column for the mime type.
I edited the form in navigator an told the blob-field to store mime-information in the mime-type-field.
Now, do i have to tell portal the mime-type or does it retrieve it itself?
if i have to tell, how do i do so?
How can i fill in the value for the mime-type-field with javascript, when the fieldname is something like abc.def.ghi?
Javascript then will tell me that document.forms.fieldname is not an object.
Wouldn't it be a good idea to write a howto on this subject (and other subjects too, of course)? I'll do the work if you share your knowledge with me.
And, by the way, can you share your wisdom about retrieving the blobs from tha database for displaying and download, too?
thank you very much,
Ralf Schmitt

Hi Ralf,
see in the design time if you are
1)Interested in only one type of content in the blob column then just mention that mime-type in the
for eg.there will be text field "or type in fixed mime type" where you can mention the default type which you are interested in uploading.
2)If you intent to upload files of diffrent type of mime-types then you will have to associate a column for storing the mime types for that file and for this there will be a text field.
for eg. you will have options for "Select a column to store mime information" which will be having list of all the remaining fields in the LOV , you select which field of the table you wish to make for storing mime-type and do not set any default mime-type in the text "or type in fixed mime type" in this case.
more explaination:
=================
for this case create a table like this :
create table for_blob(id number(4),file_name blob,mime_type_of_file varchar2(400));
when you select file_name field while designing the form you will have following option.
"Select a column to store mime information" ---> select mime_type_of_file
"or type in fixed mime type" ---> delete the content of this text field.
Now when you will actually run the form you have to insert mime-types in the text "mime_type_of_file " for eg
for PDF files: Application/pdf
for msword :Application/msword
for the first case just input the mime-type which you wish to upload.
"or type in fixed mime type" ---> delete the content of this text field say for eg for PDF files:Application/pdf
so that at run time you do not have to input any mime-type info and in this case even the field need not have the column for the mime-type.
hope this help.
rahul

Similar Messages

  • How to upload file from client machine to  database in server machine?

    I am developing a web application. this application is suppose to take file from client machine and store that to database in the server side.
    My jsp form is of multi part type. but I am confused about what to write in servlet.
    Can any one help me ?
    Edited by: chinmaya_mishra on Feb 16, 2009 2:55 AM
    Edited by: chinmaya_mishra on Feb 16, 2009 2:58 AM

    http://www.google.com/search?q=jdbc+blob
    Blob processing varies between databases; see also examples for whatever database you are using, e.g.
    http://www.google.com/search?q=jdbc+blob+oracle
    If you are storing text data instead of binary data, replace "blob" by "clob" in the searches.

  • How to upload words, exel, PDF file from the pc via itune to the iPad, and where will the uploaded file be saved? In the apps?

    How to upload words, exel, PDF file from the pc via itune to the iPad, and where will the uploaded file be saved? In the apps?

    You will need an app (or apps) on your iPad that is capable of reading the documents, as they will be saved with the app - if you don't have such an app then there is nothing to transfer them to or to read/access them.
    One method of transferring them is toconnect your iPad to your computer's iTunes, select it's app tab, and then scroll to the bottom of it - you should the apps That you've got that are capable of file-sharing (if you've got any).  Selecting/high-lighting one of them should then allow you to add files to it via the box to the right of it.
    An alternative way to get the documents onto your iPad is if the app that you want to transfer them to has a wifi setting, which will then allow you to transfer the documents wirelessly. You can also send the documents to yourself as attachments and then use Mail's 'open in' facility to copy them into your chosen app.
    Edit : more info on file sharing from the manual :
    File Sharing lets you transfer files between iPad and your computer. You can share files created with a compatible app and saved in a supported format.
    Apps that support file sharing appear in the File Sharing Apps list in iTunes. For each app, the Files list shows the documents that are on iPad. See the app’s documentation for how it shares files; not all apps support this feature.
    Connect iPad to your computer.
    In iTunes, select iPad in the Devices list, then click Apps at the top of the screen.
    In the File Sharing section, select an app from the list on the left.
    On the right, select the file you want to transfer, then click “Save to” and choose a destination on your computer.
    Transfer a file from your computer to iPad:
    Connect iPad to your computer.
    In iTunes, select iPad in the Devices list, then click Apps at the top of the screen.
    In the File Sharing section, click Add.
    Select a file, then click Choose (Mac) or OK (PC).
    The file is transferred to your device and can be opened using an app that supports that file type. To transfer more than one file, select each additional file.
    Delete a file from iPad: Select the file in the Files list, then tap Delete.
    Message was edited by: King_Penguin

  • How to upload file located on the network

    I used following API successfully upload file located on
    database machine. I
    got error when upload file located on network. I run this
    as "Portal30" user
    which has DBA priviledges.
    I used code like this.
    result:=wwsbr_api.add_item(p_caid=>53,
    p_folder_id =>4487,
    p_display_name => 'Test',
    p_type_id => wwsbr_api.ITEM_TYPE_FILE,
    p_type_caid => wwsbr_api.SHARED_OBJECTS,
    p_region_id =>5,
    -- these are not working
    p_file_filename=>'//nt2/vol2/common/test.pdf'
    p_file_filename=>'///nt2/vol2/common/test.pdf'
    p_file_filename=>'S:/common/test.pdf'
    -- this works
    p_file_filename=>'c:/test.pdf'
    Errors:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.NullPointer Exception
    ORA-06512: at "PORTAL30.WWSBR_API",line 24
    ORA-06512: at "PORTAL30.WWSBR_API",line 277
    PS: we tries run Oracle as a privileged user other than System
    user. it won't help. Am I missing something here. I am new on
    the network problem. How I can verify the privileged user access
    the network.
    we have portal 3.0.9.8.1 running on Windows 2000

    Thanks for the direction. I can upload same file through Oracle
    Portal "Add Item" user Interface. So I assume file is visible to
    the database. Notice the Portal uses wwv_additem.additem and
    wwv_add_wizard.edititem to upload file. Do they eventually use
    wwsbr_api.add_item and wwsbr_api.add_item_post_upload? What is
    syntax of reference file on remote drive?
    Thanks
    Linda

  • How to upload files/images to the database from a form.

    I'm making a custom user profile form.
    The users can update their profile in this form.
    I cannot use the standard profile form, because the customer got very specific
    demands about the context of the profile form.
    In this custom profile form the user must be able to upload an image
    from their hard disk(just like in the standard profile form).
    I've got the following questions about uploading pictures:
    - How do I make a button to show the explorer window.
    - how do I get the chooses file-name in a field.
    - how do I get the new file in the database.
    - how do I get rid of an old file in the database.
    - how do I get the image on the form.
    Or is there a special portal way to upload images/files in a form.
    Does anyone have a clue?
    regards
    arny

    Hi,
    Regular Portal forms will support upload of images/documents to the database. Just identify your column as a blob, and the 'Browse' button will automatically show up in the form and the users will get to choose the file they want to upload from their desktop.
    The thing is, I haven't been able to figure out how to get that document/image back out of the database (e.g. in a report), once it's put in. Maybe someone else can answer that.

  • How to upload file from Application Server?

    Dear Friends,
    How to upload file from Application Server?
    Plz. with example...
    Regards,
    Dharmesh

    hi,
    check the code for upload from application server.
    tables: kna1.
    types: begin of s_file,
             customer type kna1-kunnr,
             country  type kna1-land1,
             name     type kna1-name1,
             region   type kna1-regio,
           end of s_file.
    *--Internal tables
    data: it_file type s_file occurs 0 with header line.
    *-- Selection screen
    selection-screen: begin of block b1 with frame title text-001.
    parameter: p_file type rlgrap-filename default 'C:/customer.txt'
    obligatory.
    selection-screen: end of block b1.
    *-- At selection screen
    at selection-screen on value-request for p_file.
    perform file_help using p_file.
    *-- Process File
    start-of-selection.
      perform upload_file using p_file.
    *-- write File data to o/p
    end-of-selection.
      perform write_data.
    *&      Form  file_help
    form file_help  using    p_p_file.
      data: l_filepath type ibipparms-path.
      call function 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
       importing
         file_name           = l_filepath
      p_p_file = l_filepath.
    endform.                    " file_help
    *&      Form  upload_file
    form upload_file  using    p_p_file.
      call function 'WS_UPLOAD'
       exporting
         filename                      = p_p_file
         filetype                      = 'DAT'
    IMPORTING
      FILELENGTH                    =
        tables
          data_tab                      = it_file
       exceptions
         conversion_error              = 1
         file_open_error               = 2
         file_read_error               = 3
         invalid_type                  = 4
         no_batch                      = 5
         unknown_error                 = 6
         invalid_table_width           = 7
         gui_refuse_filetransfer       = 8
         customer_error                = 9
         no_authority                  = 10
         others                        = 11
      if sy-subrc <> 0.
        message i001.
      endif.
    endform.                    " upload_file
    *&      Form  write_data
    form write_data .
      loop at it_file.
        write:/ it_file-customer, it_file-country, it_file-name,
                it_file-region.
      endloop.
      endform.
    regards,
    keerthi.

  • How to upload file in a server

    Hi,
    How to upload file to server through reporting. Plz guide me and what would be the probable code.
    Thanks

    Hi,
    Try this Report Program.
    *& Report  ZUPLOADTAB                                                  *
    *& Example of Uploading tab delimited file                             *
    REPORT  zuploadtab                    .
    PARAMETERS: p_infile  LIKE rlgrap-filename
                            OBLIGATORY DEFAULT  '/usr/sap/'..
    DATA: ld_file LIKE rlgrap-filename.
    *Internal tabe to store upload data
    TYPES: BEGIN OF t_record,
        name1 like pa0002-VORNA,
        name2 like pa0002-name2,
        age   type i,
        END OF t_record.
    DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
          wa_record TYPE t_record.
    *Text version of data table
    TYPES: begin of t_uploadtxt,
      name1(10) type c,
      name2(15) type c,
      age(5)  type c,
    end of t_uploadtxt.
    DATA: wa_uploadtxt TYPE t_uploadtxt.
    *String value to data in initially.
    DATA: wa_string(255) type c.
    constants: con_tab TYPE x VALUE '09'.
    *If you have Unicode check active in program attributes then you will
    *need to declare constants as follows:
    *class cl_abap_char_utilities definition load.
    *constants:
       con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB.
    *START-OF-SELECTION
    START-OF-SELECTION.
    ld_file = p_infile.
    OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    ELSE.
      DO.
        CLEAR: wa_string, wa_uploadtxt.
        READ DATASET ld_file INTO wa_string.
        IF sy-subrc NE 0.
          EXIT.
        ELSE.
          SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
                                          wa_uploadtxt-name2
                                          wa_uploadtxt-age.
          MOVE-CORRESPONDING wa_uploadtxt TO wa_upload.
          APPEND wa_upload TO it_record.
        ENDIF.
      ENDDO.
      CLOSE DATASET ld_file.
    ENDIF.
    *END-OF-SELECTION
    END-OF-SELECTION.
    *!! Text data is now contained within the internal table IT_RECORD
    Display report data for illustration purposes
      loop at it_record into wa_record.
        write:/     sy-vline,
               (10) wa_record-name1, sy-vline,
               (10) wa_record-name2, sy-vline,
               (10) wa_record-age, sy-vline.
      endloop.
    Regards,
    Padmam.

  • Please add the option to be able to upload/link new pdfs with the in-browser editing. I have a restaurant client who is constantly updating their menu! Please help so they can do this themselves!

    Please add the option to be able to upload/link new pdfs with the in-browser editing. I have a restaurant client who is constantly updating their menu! Please help so they can do this themselves!

    Thank you so much for your help! I am so relieved. I will have explain how to do this to my client, but a big weight is off my back!
    A long learning process and actually such an easy fix. So glad you responded. Again thank you...

  • How to convert file to pdf text readable?

    How to convert file to PDF text readable?

    Hey,
    Please let me know what type of file are you trying to convert.
    You might use Adobe PDF Maker or Adobe PDF printer option and export the file to PDF.
    Regards,
    Anubha

  • How can I print a pdf in the actual size with a page border?

    How can I print a pdf in the actual size with a page border? (2 pages per sheet preferred)
    I usually print pdfs of books at a copy shop and they turn out fine.
    The problem comes when I try to print the same books at home.
    I use Adobe Acrobat X with the same settings: "multiple pages per sheet" (2x1) and page border. But the pages are slightly shrunken when printed. I think this is because my printer can't print as closely to the margins. Still, two pages should be able to fit on one sheet in actual size. Are there any layout settings that I can play with to find a better fit, besides portrait and landscape?
    If I select page scaling "none," I'm able to print the pdf in actual size, one page per sheet. But there's no option to add a page border.

    I have a test with some questions (multiple choice, FIB, matching, etc). I have just one button to submit all the answers, and after submiting the student can see his score and review the test to know where he failed. He can't answer again. However, he can change the answer multiple times before submiting.
    "if i turn on success/failure captions the student will see them while answering" - before submitting
    "if i turn them off he wont know what's the right answer" - after submitting
    My results page is the default. I didn't use any variable. When i go to the results page after reviewing the test all the entry boxes are "wrong".

  • How to transfer files (word,pdf) from my laptop to iphone5?

    how to transfer files (word,pdf) from my laptop to iphone5?

    You need an app that supports such. Something like:
    https://itunes.apple.com/us/app/pdf-expert-professional-pdf/id323133888?mt=8
    There are many such apps, search for yourself for something that meets your needs.

  • How to upload file in webdynpro abap alv

    Hello Friends,
    how to upload file in webdynpro abap alv
    Regards
    Narendra
    Moderator message: please search for available information, post in correct "Web Dynpro ABAP" forum if still required.
    Edited by: Thomas Zloch on Jun 6, 2011 11:55 AM

    Hi Narendra,
    You ahve to search before posting. This discussed many times.
    You need to use file upload ui element to upload data. and display in alv.
    Please go thorugh this..
    http://wiki.sdn.sap.com/wiki/display/WDABAP/UploadandDownloadfilesinWebdynproABAP
    Re: Upload .xls file in WDABAP
    http://forums.sdn.sap.com/click.jspa?searchID=72307893&messageID=5425671
    Cheers,
    Kris.

  • How to upload files to dashboard obiee 11g

    hi,
    can anyone explain how to upload files to obiee dashboard.
    thanks in advance..

    refer this link .
    http://total-bi.com/2011/02/external-files-obiee-dashboard/

  • 16.0.4 update now saves "smallest file size" pdf's the same size as "illustrator default"

    16.0.4 update now saves "smallest file size" pdf's the same size as "illustrator default" ...anyone else?
    I have to save the file, open it in acrobat, then resave using "reduced file size"
    this is since I updated to 16.0.4 yesterday I think....there was some update
    what happened?

    I used default setting each time...now that its updated, I cannot compare it to before the date
    can anyone check these settings?

  • How to upload pictures to Facebook using the Bloggie Software

    If you have any further questions please feel free to ask away. I will do my best to find the answer you are looking for!
    - Patrick

    Sony wants your feedback! http://bit.ly/WcYjMO
    This video will show you how to upload pictures to Facebook using the Bloggie Software.
    If you have any further questions please feel free to ask away. I will do my best to find the answer you are looking for!
    - Patrick

Maybe you are looking for

  • Create Title from File Name

    Is there a way to automatically transfer the file name to the title of the image? Can it be done with a script in the export cations folder? If it can, does anyone have a script?

  • String.replaceAll

    String line = "\"\\\"\""; // i.e. "\"" line = line.replaceAll("\\\"", "@"); I've expected the code above to change to but I get Could you please help me to understand why it is happening. P.S. I'd like to use the above technics in order to parse scri

  • Is it possible to export aaa client info using csutil utility?

    I am able to import client and group info but need to export to verify they are all there as i have migrated from unix to windows... thanks

  • JTable... needs to be updated....

    Hello... I am using a JTable in my application.... Now I need to update a JTable... The Operation I need to preform are 1). Add new row to the table.. 2). manipulate a cell value based on the rows first column value.. I want to search for the first c

  • IPad Air with Google Docs app

    I have an iPad Air with the Google Doc  App loaded.  In creating a Google Document why is it impossible to SINGLE space within a document????  What is the reasoning why the app does not allow for SINGLE spacing???