Upload , dilimited file

Hi,
  I am tring to upload , dilimited file into internal table using GUIUPLOAD function module. its not reading only first field only. Please help me out.
Thanks.
file has
name,value
GUI Function
call function 'GUI_UPLOAD'
    exporting
      filename                = l_name
      has_field_separator     = ','
    tables
      data_tab                = it_itab
    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.

Check this FM documentation:
FU GUI_UPLOAD                     HAS_FIELD_SEPARATOR
Short Text
Columns Separated by Tabs in Case of ASCII Upload
Description
Specifies if the fields in the file are separated by a tab. This is necessary if the structure passed contains several components. CR/LF occurs instead of a tab after the last field of a row.
Value range
'X': Fields are separated by tabs.
SPACE: Fields are not separated by tabs. In this case, the table must
contain either only one single column or all columns must be contained
in the file in their full length.
Default
SPACE
Function Module
GUI_UPLOAD
This is the rich's reply in one of the posts:
Here is an example program.
code
report zrich_0001.
types: begin of ttab,
rec(1000) type c,
end of ttab.
types: begin of tdat,
fld1(10) type c,
fld2(10) type c,
fld3(10) type c,
end of tdat.
data: itab type table of ttab with header line.
data: idat type table of tdat with header line.
data: file_str type string.
parameters: p_file type localfile.
at selection-screen on value-request for p_file.
call function 'KD_GET_FILENAME_ON_F4'
exporting
static = 'X'
changing
file_name = p_file.
start-of-selection.
file_str = p_file.
call function 'GUI_UPLOAD'
exporting
filename = file_str
tables
data_tab = itab
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.
loop at itab.
clear idat.
split itab-rec at ',' into idat-fld1
idat-fld2
idat-fld3.
append idat.
endloop.
loop at idat.
write:/ idat-fld1, idat-fld2, idat-fld3.
endloop.
[/code]
Regards,
Rich Heilman
Edited by: Aparna Shekhar on Jun 2, 2008 2:33 PM

Similar Messages

  • Error in uploading a file in server

    Hi,
    We are working in a application whose technologies are Flex 4.0 and .Net 2010.
    We are using .Net WCF Service for interacting with backend from the Flex front end.
    In our application, we have requirement to upload a file from the client into a server.
    We faced the following issue,
    Security violation Issue #2032.
    Solution: We have found that there is a sandbox restriction to access other domains, then we have placed the crossdomain.xml, which resolves the issue.
    But this solution works only in the IE.
    We are still getting the same error (Error #2032: Stream Error.) in other browsers - FireFox, Chrome and Safari.
    Please let us know if there are any suggestions or solutions for this issue.
    Regards,
    Guru

    Siva,
    You must apply modifiable binary type in wdDoInit of controller:
    ISimpleType stype =
      wdContext
        .node<YourNode>()
          .getNodeInfo()
            .getAttribute("FileResource")
              .getModifiableSimpleType();
    IWDModifiableBinaryType mtype = (IWDModifiableBinaryType)stype;
    /* Optional steps: affects only FileDownload control */
    /* mtype.setMimeType( WDWebResourceType.JPG_IMAGE);  */
    /* mtype.setFileName( "picture.jpg" );               */
    Sure, to make above work you must use binary type in context designer.
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • How to upload a file in application server to an internal table

    Hi,
          I am asked to upload a file from application server to internal table. Can you please suggest me the ways to do it or the function module which helps to browse the application server file names.
      I have done a program. But its giving problem in searching the files from application server. I am pasting my code for ur review. Please tell me which part i have to correct or suggest me some other ways to do it.
    *& Report  ZUPLOAD1
    REPORT  ZUPLOAD1.
    type-pools: truxs.
    parameters: p_upl_ps radiobutton group g1 default 'X', "upload from pres. server
                 p_path type rlgrap-filename, 
                 p_upl_as radiobutton group g1,   "upload from appln server
                 <b>p_dir LIKE filepath-pathintern DEFAULT 'Y_ABAP', 
                 p_file LIKE filepath-pathintern lower case,</b>      
                 p_test as checkbox.
    constants: c_x value 'X',
               c_tab type c value cl_abap_char_utilities=>horizontal_tab.
    types: ty_data(1000) type c.    "structure to hold legacy data
    data: i_data type standard table of ty_data. "internal table of ty_data
    types: begin of stritab,
          land1 type v_t604-land1,  "structure of legacy file.
          stawn type v_t604-stawn,
          bemeh type v_t604-bemeh,
          impma type v_t604-impma,
          minol type v_t604-minol,
          end of stritab.
    data: gi_itab type standard table of stritab, "internal table of legacy file
          gw_itab type stritab.  "work area
    data: i_raw type truxs_t_text_data,
          v_fullpath type string.
    at selection-screen on value-request for p_path.
    if p_upl_ps = c_x. "if presentation server is selected
    perform get_file.
    else.            "if application server is selected
    perform set_file_path.      
    perform upload_from_server.
    perform split_data.
    endif.
    form get_file.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
    IMPORTING
       FILE_NAME           = p_path.     "getting the file name of pres server
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
      EXPORTING
      I_FIELD_SEPERATOR          =
        I_LINE_HEADER              = 'X'              "converting excel to sap and filling in
        I_TAB_RAW_DATA             = i_raw      "internal table
        I_FILENAME                 = p_path
      TABLES
        I_TAB_CONVERTED_DATA       = gi_itab
    EXCEPTIONS
       CONVERSION_FAILED          = 1
       OTHERS                     = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endform.
    form set_file_path.                 "Getting the file path of application server
    data: lv_file type p_file.
          lv_file = p_file.
          CALL FUNCTION 'FILE_GET_NAME_USING_PATH'
            EXPORTING
            CLIENT                           = SY-MANDT
              LOGICAL_PATH                     = p_dir
            OPERATING_SYSTEM                 = SY-OPSYS
            PARAMETER_1                      = ' '
            PARAMETER_2                      = ' '
            PARAMETER_3                      = ' '
            USE_BUFFER                       = ' '
              FILE_NAME                        = lv_file
            USE_PRESENTATION_SERVER          = ' '
            ELEMINATE_BLANKS                 = 'X'
           IMPORTING
             FILE_NAME_WITH_PATH              = v_fullpath
           EXCEPTIONS
             PATH_NOT_FOUND                   = 1
             MISSING_PARAMETER                = 2
             OPERATING_SYSTEM_NOT_FOUND       = 3
             FILE_SYSTEM_NOT_FOUND            = 4
             OTHERS                           = 5
          IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    endform.
    form upload_from_server.
    data: lv_msg type string,
          lw_data type ty_data.
    open dataset v_fullpath for input message lv_msg in text mode encoding default.
    if sy-subrc <> 0.
    message lv_msg type 'i'.
    stop.
    endif.
    do.
    read dataset v_fullpath into lw_data.
    if sy-subrc <> 0.
    write:/5 'Error in processign data set'.
    exit.
    endif.
    append lw_data to i_data.
    enddo.
    close dataset v_fullpath.
    if sy-subrc <> 0.
    write: /5 'Error closing dataset'.
    endif.
    endform.
    form split_data.
    data: lw_data type ty_data.
    data: lw_itab type stritab.
    data: begin of ty_itab,
          land1 type v_t604-land1,
          stawn type v_t604-stawn,
          bemeh type v_t604-bemeh,
          impma type v_t604-impma,
          minol type v_t604-minol,
          end of ty_itab.
    loop at i_data into lw_data.
    split lw_data at c_tab into
          ty_itab-land1
          ty_itab-stawn
          ty_itab-bemeh
          ty_itab-impma
          ty_itab-minol.
    lw_itab-land1 = ty_itab-land1.
    lw_itab-stawn = ty_itab-stawn.
    lw_itab-bemeh = ty_itab-bemeh.
    lw_itab-impma = ty_itab-impma.
    lw_itab-minol = ty_itab-minol.
    append lw_itab to gi_itab.
    endloop.
    endform.
    start-of-selection.
    loop at gi_itab into gw_itab.
    write: /5 'COUNTRY', 'IMPORT CODE', 'SUP UNIT', 'FIRST UOM', 'SECOND UOM',
           /5 gw_itab-land1, gw_itab-stawn,gw_itab-bemeh,gw_itab-impma,gw_itab-minol.
    endloop.
    end-of-selection.
    I hope problem must be in p_dir and p_file which are in bold.. Kindly help me out. Thanks in advance.

    see the following ex:
    *&      Form  SUB_GET_FILEPATH
          text
    -->  p1        text
    <--  p2        text
    FORM SUB_GET_FILEPATH .
        GFILE = 'D:\SAP_INT\INBOUND\INBOX'.  "Path
    ENDFORM.                    " SUB_GET_FILEPATH
    *&      Form  SUB_GET_FILE
          text
    -->  p1        text
    <--  p2        text
    FORM SUB_GET_FILE .
      DATA: P_FDIR(200) TYPE C.
      DATA: IT_FILEDIR1 TYPE STANDARD TABLE OF TY_FILEDIR WITH HEADER LINE.
      P_FDIR = GFILE.
      CALL FUNCTION 'RZL_READ_DIR_LOCAL'
        EXPORTING
          NAME     = P_FDIR
        TABLES
          FILE_TBL = IT_FILEDIR.
      REFRESH : IT_FILEDIR1.
      LOOP AT IT_FILEDIR.
        IF IT_FILEDIR-NAME(4) = 'ZINC' OR IT_FILEDIR-NAME(4) = 'zinc'.
          MOVE IT_FILEDIR-NAME TO IT_FILEDIR1-NAME.
          APPEND IT_FILEDIR1.
        ENDIF.
      ENDLOOP.
      IF IT_FILEDIR1[] IS INITIAL.
        STOP.
      ENDIF.
      LOOP AT IT_FILEDIR1.
        REFRESH: I_TAB.
        CLEAR: I_TAB.
        NAME = IT_FILEDIR1-NAME.
        CONCATENATE: GFILE '\' NAME INTO G_FILE.
        OPEN DATASET G_FILE FOR INPUT IN TEXT MODE
                                         ENCODING DEFAULT
                                         IGNORING CONVERSION ERRORS.
        IF SY-SUBRC EQ 0.
          CONCATENATE 'FILENAME  : ' G_FILE INTO I_MSG1.
          APPEND I_MSG1.
          DO.
            READ DATASET G_FILE INTO RECORD.
            IF SY-SUBRC = 0.
              SPLIT RECORD AT ',' INTO I_TAB-BUKRS  I_TAB-EBELN
                  I_TAB-BLDAT  I_TAB-XBLNR I_TAB-LIFNR I_TAB-AMOUNT
                  I_TAB-CURR  I_TAB-BUSAREA
                  I_TAB-BKTXT I_TAB-DMBTR I_TAB-MENGE I_TAB-SRNO.
              MOVE-CORRESPONDING I_TAB TO I_TAB1.
            ELSE.
              EXIT.
            ENDIF.
            APPEND I_TAB1.
            CLEAR: I_TAB, I_TAB1.
          ENDDO.
        ENDIF.
        CLOSE DATASET G_FILE.

  • Unable to see the logical path and file created in FILE tcode from AL11 and unable to upload the file to this path from front end

    Hi Experts,
    I have created the logical path and filename in FILE tcode.I am trying to upload the pdf file to application server by using this path.But
    I am getting message like "Unable to open the file".Even I cannot find the this path in AL11 tcode.Kindly anyone advise how to upload pdf file using
    custom path and file created from FILE tcode.
    Thanks & Regards,
    Anusha.

    Hi Anusha,
    Please give as below.
    I forget to say you cannot open the PDF in AL11 and for that you need some configuration, i think it can be done using content server,not sure completely please wait for some more suggestions.
    Regards,
    Pavan

  • Error while uploading WSDL file in Interactive Form Data Connection!

    I have created we service to return some data based on user input.
    I am trying to link this webservice to Interactive adobe form! and While creating new data connection->uploading WSDL file--> I am receiving error i.e. Invalid File.
    Please help me in resolving this issue.
    I have created this WSDL file copy/pasting XML code generates from "Open WSDL document for selected binding" link in SOAMANAGER.
    Regards,
    Naveen.I

    Hello,
    This is a Webservice created for the FM : HRXSS_PER_READ_EMERGENCY_AR
    Here is the sample of the WSDL file generated, as asked by you.
    <?xml version="1.0" encoding="utf-8" ?>
    - <wsdl:definitions targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:n1="urn:sap-com:document:sap:rfc:functions">
    - <wsdl:documentation>
      <sidl:sidl xmlns:sidl="http://www.sap.com/2007/03/sidl" />
      </wsdl:documentation>
      <wsp:UsingPolicy wsdl:required="true" />
    - <wsp:Policy wsu:Id="BN_BN_ZHR_READ_EMERGENCY">
      <saptrnbnd:OptimizedXMLTransfer uri="http://xml.sap.com/2006/11/esi/esp/binxml" xmlns:saptrnbnd="http://www.sap.com/webas/710/soap/features/transportbinding/" wsp:Optional="true" />
      <saptrnbnd:OptimizedXMLTransfer uri="http://www.w3.org/2004/08/soap/features/http-optimization" xmlns:saptrnbnd="http://www.sap.com/webas/710/soap/features/transportbinding/" wsp:Optional="true" />
    - <wsp:ExactlyOne xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:sapsp="http://www.sap.com/webas/630/soap/features/security/policy" xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility">
    - <wsp:All>
    - <sp:TransportBinding>
    - <wsp:Policy>
    - <sp:TransportToken>
    - <wsp:Policy>
      <sp:HttpsToken />
      </wsp:Policy>
      </sp:TransportToken>
    - <sp:AlgorithmSuite>
    - <wsp:Policy>
      <sp:TripleDesRsa15 />
      </wsp:Policy>
      </sp:AlgorithmSuite>
    - <sp:Layout>
    - <wsp:Policy>
      <sp:Strict />
      </wsp:Policy>
      </sp:Layout>
      </wsp:Policy>
      </sp:TransportBinding>
      </wsp:All>
      </wsp:ExactlyOne>
      </wsp:Policy>
    - <wsp:Policy wsu:Id="IF_IF_ZHR_READ_EMERGENCY">
    - <sapsession:Session xmlns:sapsession="http://www.sap.com/webas/630/soap/features/session/">
      <sapsession:enableSession>false</sapsession:enableSession>
      </sapsession:Session>
      <sapcentraladmin:CentralAdministration xmlns:sapcentraladmin="http://www.sap.com/webas/700/soap/features/CentralAdministration/" wsp:Optional="true" />
      </wsp:Policy>
    - <wsp:Policy wsu:Id="OP_IF_OP_HrxssPerReadEmergencyAr">
      <sapcomhnd:enableCommit xmlns:sapcomhnd="http://www.sap.com/NW05/soap/features/commit/">false</sapcomhnd:enableCommit>
      <sapblock:enableBlocking xmlns:sapblock="http://www.sap.com/NW05/soap/features/blocking/">true</sapblock:enableBlocking>
      <saptrhnw05:required xmlns:saptrhnw05="http://www.sap.com/NW05/soap/features/transaction/">no</saptrhnw05:required>
      <saprmnw05:enableWSRM xmlns:saprmnw05="http://www.sap.com/NW05/soap/features/wsrm/">false</saprmnw05:enableWSRM>
      </wsp:Policy>
    - <wsdl:types>
    - <xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:rfc:functions">
    - <xsd:simpleType name="char1">
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="1" />
      </xsd:restriction>
      </xsd:simpleType>
    "More simple types
      <xsd:pattern value="\d*" />
      </xsd:restriction>
      </xsd:simpleType>
      </xsd:schema>
    - <xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:n0="urn:sap-com:document:sap:rfc:functions">
      <xsd:import namespace="urn:sap-com:document:sap:rfc:functions" />
    - <xsd:complexType name="Bapiret2">
    - <xsd:sequence>
    "More element names
    - <xsd:complexType>
    - <xsd:sequence>
      <xsd:element name="Messages" type="tns:Bapirettab" />
      <xsd:element name="Records" type="tns:HcmtBspPaArR0006Tab" />
      <xsd:element name="Records2" type="tns:HcmtBspPaArR0021Tab" />
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:schema>
      </wsdl:types>
    - <wsdl:message name="HrxssPerReadEmergencyAr">
      <wsdl:part name="parameters" element="tns:HrxssPerReadEmergencyAr" />
      </wsdl:message>
    - <wsdl:message name="HrxssPerReadEmergencyArResponse">
      <wsdl:part name="parameter" element="tns:HrxssPerReadEmergencyArResponse" />
      </wsdl:message>
    - <wsdl:portType name="ZHR_READ_EMERGENCY">
    - <wsp:Policy>
      <wsp:PolicyReference URI="#IF_IF_ZHR_READ_EMERGENCY" />
      </wsp:Policy>
    - <wsdl:operation name="HrxssPerReadEmergencyAr">
    - <wsp:Policy>
      <wsp:PolicyReference URI="#OP_IF_OP_HrxssPerReadEmergencyAr" />
      </wsp:Policy>
      <wsdl:input message="tns:HrxssPerReadEmergencyAr" />
      <wsdl:output message="tns:HrxssPerReadEmergencyArResponse" />
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:binding name="ZHR_READ_EMERGENCY" type="tns:ZHR_READ_EMERGENCY">
    - <wsp:Policy>
      <wsp:PolicyReference URI="#BN_BN_ZHR_READ_EMERGENCY" />
      </wsp:Policy>
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    - <wsdl:operation name="HrxssPerReadEmergencyAr">
      <soap:operation soapAction="" style="document" />
    - <wsdl:input>
      <soap:body use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:service name="service">
    - <wsdl:port name="ZHR_READ_EMERGENCY" binding="tns:ZHR_READ_EMERGENCY">
      <soap:address location="http://cieh4-srvr.collabera.com:8000/sap/bc/srt/rfc/sap/zhr_read_emergency/900/zhr_read_emergency/zhr_read_emergency" />
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>
    Cheers,
    Remi

  • Error while uploading the file from Allpcation server in LSMW-7th step

    Hi Experts,
    what should be the specific CODE PAGE should be maintained while uploading the file from application server in LSMW-7th Step
    Thanks in advance,
    KSR

    Hi
    I mean that there is any seperate CODE PAGE which comes at the bottom of screen while uploading the file from the application server in 7th step.
    Is there any specific CODE PAGE to be maintained...
    Thanks in advance
    Oarsk

  • Unable to upload video files via iframe in safari version 3.0

    I m not able 2 upload video files via iframe in safari 3.0.
    i m facing this issue when i try 2 upload a video file via an iframe.
    file gets uploaded properly if i m not using iframe to upload the same.
    this issue is seen only in safari version 3.0 and not in the newer version i.e (3.2.1)
    do anyone has the asnwer for this problem.....???
    would be thankful to him/her...

    Are you using a BT Home Hub with the IP Phone attached. This holds onto the SIP port that iChat uses. There is no way to get the router to release this port.
    I had to return it all to BT as unfit for purpose and switched to Eclipse!

  • Upload multiple files WITH correct pairs of form fields into Database

    In my form page, I would like to allow 3 files upload and 3 corresponding text fields, so that the filename and text description can be saved in database table in correct pair. Like this:
    INSERT INTO table1 (filename,desc) VALUES('photo1.jpg','happy day');
    INSERT INTO table1 (filename,desc) VALUES('photo2.jpg','fire camp');
    INSERT INTO table1 (filename,desc) VALUES('photo3.jpg','christmas night');
    However, using the commons fileupload, http://commons.apache.org/fileupload/, I don't know how to reconstruct my codes so that I can acheieve this result.
    if(item.isFormField()){
    }else{
    }I seems to be restricted from this structure.
    The jsp form page
    <input type="text" name="description1" value="" />
    <input type="file" name="sourcefile" value="" />
    <input type="text" name="description2" value="" />
    <input type="file" name="sourcefile" value="" />The Servlet file
    package Upload;
    import sql.*;
    import user.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.Map;
    import java.util.HashMap;
    import java.util.Date;
    import java.util.List;
    import java.util.Iterator;
    import java.io.File;
    import java.io.PrintWriter;
    import java.io.IOException;
    import java.text.SimpleDateFormat;
    import org.apache.commons.fileupload.servlet.ServletFileUpload;
    import org.apache.commons.fileupload.disk.DiskFileItemFactory;
    import org.apache.commons.fileupload.*;
    public class UploadFile extends HttpServlet {
    private String fs;
    private String category = null;
    private String realpath = null;
    public String imagepath = null;
    public PrintWriter out;
    private Map<String, String> formfield = new HashMap<String, String>();
      //Initialize global variables
      public void init(ServletConfig config, ServletContext context) throws ServletException {
        super.init(config);
      //Process the HTTP Post request
      public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
        request.setCharacterEncoding("utf-8");
        response.setCharacterEncoding("utf-8");
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();
        Thumbnail thumb = new Thumbnail();
        fs = System.getProperty("file.separator");
        this.SetImagePath();
         boolean isMultipart = ServletFileUpload.isMultipartContent(request);
         if(!isMultipart){
          out.print("not multiple part.");
         }else{
             FileItemFactory factory = new DiskFileItemFactory();
             ServletFileUpload upload = new ServletFileUpload(factory);
             List items = null;
             try{
                items = upload.parseRequest(request);
             } catch (FileUploadException e) {
                e.printStackTrace();
             Iterator itr = items.iterator();
             while (itr.hasNext()) {
               FileItem item = (FileItem) itr.next();
               if(item.isFormField()){
                  String formvalue = new String(item.getString().getBytes("ISO-8859-1"), "utf-8");
                  formfield.put(item.getFieldName(),formvalue);
                  out.println("Normal Form Field, ParaName:" + item.getFieldName() + ", ParaValue: " + formvalue + "<br/>");
               }else{
                 String itemName = item.getName();
                 String filename = GetTodayDate() + "-" + itemName;
                 try{
                   new File(this.imagepath + formfield.get("category")).mkdirs();
                   new File(this.imagepath + formfield.get("category")+fs+"thumbnails").mkdirs();
                   //Save the file to the destination path
                   File savedFile = new File(this.imagepath + formfield.get("category") + fs + filename);
                   item.write(savedFile);
                   thumb.Process(this.imagepath + formfield.get("category") +fs+ filename,this.imagepath + formfield.get("category") +fs+ "thumbnails" +fs+ filename, 25, 100);
                   DBConnection db = new DBConnection();
                   String sql = "SELECT id from category where name = '"+formfield.get("category")+"'";
                   db.SelectQuery(sql);
                    while(db.rs.next()){
                      int cat_id = db.rs.getInt("id");
                      sql = "INSERT INTO file (cat_id,filename,description) VALUES ("+cat_id+",'"+filename+"','"+formfield.get("description")+"')";
                      out.println(sql);
                      db.RunQuery(sql);
                 } catch (Exception e){
                    e.printStackTrace();
            HttpSession session = request.getSession();
            UserData k = (UserData)session.getAttribute("userdata");
            k.setMessage("File Upload successfully");
            response.sendRedirect("./Upload.jsp");
      //Get today date, it is a test, actually the current date can be retrieved from SQL
      public String GetTodayDate(){
        SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
        String today = format.format(new Date());
        return today;
      //Set the current RealPath which the file calls for this file
      public void SetRealPath(){
        this.realpath = getServletConfig().getServletContext().getRealPath("/");
      public void SetImagePath(){
        this.SetRealPath();
        this.imagepath = this.realpath + "images" +fs;
    }Can anyone give me some code suggestion? Thx.

    When one hits the submit button - I then get a 404 page error.What is the apaches(?) error log saying? Mostly you get very useful information when looking into the error log!
    In any case you may look at how you are Uploading Multiple Files with mod_plsql.

  • Trying to get lighttpd to upload a file through perl cgi

    Hi, I'm quite new in these things, so I might be doing something obvious wrong, but I'd like some help on this.
    I'm trying to make a webpage where people can upload files, this is the html page (located at /srv/html/index.html):
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>lighttpd Test Page</title>
    </head>
    <body>
    <div style="text-align:center; font: 12px sans-serif;">
    <span style="font-weight: bold; font-size: 20px;">
    Arch Linux
    </span>
    <br><br>
    This is a test page for the lighttpd Web Server.<br>
    <form action="/cgi-bin/upload.pl" method="post" enctype="multipart/form-data">
    <input type="file" name="fileName" size="40">
    <input type="submit" value="Send">
    <input type="reset">
    </form>
    </div>
    </body>
    </html>
    And the backend (in /srv/html/cgi-bin/upload.pl):
    #!/usr/bin/perl -wT
    use strict;
    use CGI;
    use CGI::Carp qw ( fatalsToBrowser );
    use File::Basename;
    $CGI::POST_MAX = 1024 * 1024 * 5000; # 5GB filesize limit
    my $safe_filename_characters = "a-zA-Z0-9_.-";
    my $upload_dir = "/srv/jail/";
    my $query = new CGI;
    my $filename = $query->param("fileName");
    if ( !$filename )
    print $query->header ( );
    print "There was a problem uploading your file (filesize limit may be exceeded).";
    exit;
    my ( $name, $path, $extension ) = fileparse ( $filename, '\..*' );
    $filename = $name . $extension;
    $filename =~ tr/ /_/;
    $filename =~ s/[^$safe_filename_characters]//g;
    if ( $filename =~ /^([$safe_filename_characters]+)$/ )
    $filename = $1;
    else
    die "Filename contains invalid characters";
    my $upload_filehandle = $query->upload("fileName");
    open ( UPLOADFILE, ">$upload_dir/$filename" ) or die "$!";
    binmode UPLOADFILE;
    while ( <$upload_filehandle> )
    print UPLOADFILE;
    close UPLOADFILE;
    print $query->header ( );
    print <<END_HTML;
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Done!</title>
    </head>
    <body>
    <p>Uploading done!</p>
    </body>
    </html>
    END_HTML
    My server config:
    # lighttpd configuration file
    # use it as a base for lighttpd 1.0.0 and above
    # $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $
    ############ Options you really have to take care of ####################
    ## modules to load
    # at least mod_access and mod_accesslog should be loaded
    # all other module should only be loaded if really neccesary
    # - saves some time
    # - saves memory
    server.modules = (
    # "mod_rewrite",
    # "mod_redirect",
    # "mod_alias",
    "mod_access",
    # "mod_cml",
    # "mod_trigger_b4_dl",
    # "mod_auth",
    # "mod_status",
    # "mod_setenv",
    # "mod_fastcgi",
    # "mod_proxy",
    # "mod_simple_vhost",
    # "mod_evhost",
    # "mod_userdir",
    "mod_cgi",
    # "mod_compress",
    # "mod_ssi",
    # "mod_usertrack",
    # "mod_expire",
    # "mod_secdownload",
    # "mod_rrdtool",
    "mod_accesslog" )
    ## a static document-root, for virtual-hosting take look at the
    ## server.virtual-* options
    server.document-root = "/srv/http/"
    ## where to send error-messages to
    server.errorlog = "/var/log/lighttpd/error.log"
    # files to check for if .../ is requested
    index-file.names = ( "index.php", "index.html",
    "index.htm", "default.htm" )
    ## set the event-handler (read the performance section in the manual)
    # server.event-handler = "freebsd-kqueue" # needed on OS X
    # mimetype mapping
    mimetype.assign = (
    ".pdf" => "application/pdf",
    ".sig" => "application/pgp-signature",
    ".spl" => "application/futuresplash",
    ".class" => "application/octet-stream",
    ".ps" => "application/postscript",
    ".torrent" => "application/x-bittorrent",
    ".dvi" => "application/x-dvi",
    ".gz" => "application/x-gzip",
    ".pac" => "application/x-ns-proxy-autoconfig",
    ".swf" => "application/x-shockwave-flash",
    ".tar.gz" => "application/x-tgz",
    ".tgz" => "application/x-tgz",
    ".tar" => "application/x-tar",
    ".zip" => "application/zip",
    ".mp3" => "audio/mpeg",
    ".m3u" => "audio/x-mpegurl",
    ".wma" => "audio/x-ms-wma",
    ".wax" => "audio/x-ms-wax",
    ".ogg" => "application/ogg",
    ".wav" => "audio/x-wav",
    ".gif" => "image/gif",
    ".jar" => "application/x-java-archive",
    ".jpg" => "image/jpeg",
    ".jpeg" => "image/jpeg",
    ".png" => "image/png",
    ".xbm" => "image/x-xbitmap",
    ".xpm" => "image/x-xpixmap",
    ".xwd" => "image/x-xwindowdump",
    ".css" => "text/css",
    ".html" => "text/html",
    ".htm" => "text/html",
    ".js" => "text/javascript",
    ".asc" => "text/plain",
    ".c" => "text/plain",
    ".cpp" => "text/plain",
    ".log" => "text/plain",
    ".conf" => "text/plain",
    ".text" => "text/plain",
    ".txt" => "text/plain",
    ".dtd" => "text/xml",
    ".xml" => "text/xml",
    ".mpeg" => "video/mpeg",
    ".mpg" => "video/mpeg",
    ".mov" => "video/quicktime",
    ".qt" => "video/quicktime",
    ".avi" => "video/x-msvideo",
    ".asf" => "video/x-ms-asf",
    ".asx" => "video/x-ms-asf",
    ".wmv" => "video/x-ms-wmv",
    ".bz2" => "application/x-bzip",
    ".tbz" => "application/x-bzip-compressed-tar",
    ".tar.bz2" => "application/x-bzip-compressed-tar",
    # default mime type
    "" => "application/octet-stream",
    # Use the "Content-Type" extended attribute to obtain mime type if possible
    #mimetype.use-xattr = "enable"
    ## send a different Server: header
    ## be nice and keep it at lighttpd
    # server.tag = "lighttpd"
    #### accesslog module
    accesslog.filename = "/var/log/lighttpd/access.log"
    ## deny access the file-extensions
    # ~ is for backupfiles from vi, emacs, joe, ...
    # .inc is often used for code includes which should in general not be part
    # of the document-root
    url.access-deny = ( "~", ".inc" )
    $HTTP["url"] =~ "\.pdf$" {
    server.range-requests = "disable"
    # which extensions should not be handle via static-file transfer
    # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
    static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
    ######### Options that are good to be but not neccesary to be changed #######
    ## bind to port (default: 80)
    server.port = ###
    ## bind to localhost (default: all interfaces)
    #server.bind = "127.0.0.1"
    ## error-handler for status 404
    #server.error-handler-404 = "/error-handler.html"
    #server.error-handler-404 = "/error-handler.php"
    ## to help the rc.scripts
    server.pid-file = "/var/run/lighttpd/lighttpd.pid"
    ###### virtual hosts
    ## If you want name-based virtual hosting add the next three settings and load
    ## mod_simple_vhost
    ## document-root =
    ## virtual-server-root + virtual-server-default-host + virtual-server-docroot
    ## or
    ## virtual-server-root + http-host + virtual-server-docroot
    #simple-vhost.server-root = "/srv/http/vhosts/"
    #simple-vhost.default-host = "www.example.org"
    #simple-vhost.document-root = "/htdocs/"
    ## Format: <errorfile-prefix><status-code>.html
    ## -> ..../status-404.html for 'File not found'
    #server.errorfile-prefix = "/usr/share/lighttpd/errors/status-"
    #server.errorfile-prefix = "/srv/http/errors/status-"
    ## virtual directory listings
    #dir-listing.activate = "enable"
    ## enable debugging
    #debug.log-request-header = "enable"
    #debug.log-response-header = "enable"
    #debug.log-request-handling = "enable"
    #debug.log-file-not-found = "enable"
    ### only root can use these options
    # chroot() to directory (default: no chroot() )
    #server.chroot = "/"
    ## change uid to <uid> (default: don't care)
    server.username = "http"
    ## change uid to <uid> (default: don't care)
    server.groupname = "http"
    #### compress module
    #compress.cache-dir = "/var/cache/lighttpd/compress/"
    #compress.filetype = ("text/plain", "text/html")
    #### proxy module
    ## read proxy.txt for more info
    #proxy.server = ( ".php" =>
    # ( "localhost" =>
    # "host" => "192.168.0.101",
    # "port" => 80
    #### fastcgi module
    ## read fastcgi.txt for more info
    ## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
    #fastcgi.server = ( ".php" =>
    # ( "localhost" =>
    # "socket" => "/var/run/lighttpd/php-fastcgi.socket",
    # "bin-path" => "/usr/bin/php-cgi"
    #### CGI module
    cgi.assign = ( ".pl" => "/usr/bin/perl",
    ".cgi" => "/usr/bin/perl" )
    #### SSL engine
    #$SERVER["socket"] == "0.0.0.0:443" {
    ssl.engine = "enable"
    ssl.pemfile = "/etc/ssl/private/lighttpd.pem"
    # server.errorlog = "/var/log/lighttpd/error-ssl.log"
    # accesslog.filename = "/var/log/lighttpd/access-ssl.log"
    # server.document-root = "/home/lighttpd/html-ssl"
    #### status module
    #status.status-url = "/server-status"
    #status.config-url = "/server-config"
    #### auth module
    ## read authentication.txt for more info
    #auth.backend = "plain"
    #auth.backend.plain.userfile = "lighttpd.user"
    #auth.backend.plain.groupfile = "lighttpd.group"
    #auth.backend.ldap.hostname = "localhost"
    #auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
    #auth.backend.ldap.filter = "(uid=$)"
    #auth.require = ( "/server-status" =>
    # "method" => "digest",
    # "realm" => "download archiv",
    # "require" => "user=jan"
    # "/server-config" =>
    # "method" => "digest",
    # "realm" => "download archiv",
    # "require" => "valid-user"
    #### url handling modules (rewrite, redirect, access)
    #url.rewrite = ( "^/$" => "/server-status" )
    #url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
    #### both rewrite/redirect support back reference to regex conditional using %n
    #$HTTP["host"] =~ "^www\.(.*)" {
    # url.redirect = ( "^/(.*)" => "http://%1/$1" )
    # define a pattern for the host url finding
    # %% => % sign
    # %0 => domain name + tld
    # %1 => tld
    # %2 => domain name without tld
    # %3 => subdomain 1 name
    # %4 => subdomain 2 name
    #evhost.path-pattern = "/srv/http/vhosts/%3/htdocs/"
    #### expire module
    #expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
    #### ssi
    #ssi.extension = ( ".shtml" )
    #### rrdtool
    #rrdtool.binary = "/usr/bin/rrdtool"
    #rrdtool.db-name = "/var/lib/lighttpd/lighttpd.rrd"
    #### setenv
    #setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
    #setenv.add-response-header = ( "X-Secret-Message" => "42" )
    ## for mod_trigger_b4_dl
    # trigger-before-download.gdbm-filename = "/var/lib/lighttpd/trigger.db"
    # trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
    # trigger-before-download.trigger-url = "^/trigger/"
    # trigger-before-download.download-url = "^/download/"
    # trigger-before-download.deny-url = "http://127.0.0.1/index.html"
    # trigger-before-download.trigger-timeout = 10
    ## for mod_cml
    ## don't forget to add index.cml to server.indexfiles
    # cml.extension = ".cml"
    # cml.memcache-hosts = ( "127.0.0.1:11211" )
    #### variable usage:
    ## variable name without "." is auto prefixed by "var." and becomes "var.bar"
    #bar = 1
    #var.mystring = "foo"
    ## integer add
    #bar += 1
    ## string concat, with integer cast as string, result: "www.foo1.com"
    #server.name = "www." + mystring + var.bar + ".com"
    ## array merge
    #index-file.names = (foo + ".php") + index-file.names
    #index-file.names += (foo + ".php")
    #### include
    #include /etc/lighttpd/lighttpd-inc.conf
    ## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
    #include "lighttpd-inc.conf"
    #### include_shell
    #include_shell "echo var.a=1"
    ## the above is same as:
    #var.a=1
    The site is running over https with a self signed ssl-cert, if that matters. If I try to upload a file, the browser just quickly reloades the page, the filename still in the input field. The file isn't uploaded and the page that the script should display when completed doesn't show neither.
    Does anyone know how to troubleshoot this? I'm not getting any errors, it just doesn't work..

    I haven't used Websphere before so I can't say much about that. Try putting <%@ page language="Java" %> at the top of your jsp page.
    Try putting your java files into a package and see if that helps. I read somewhere that Tomcat once had issues with running classes that weren't in a package. Make sure to put the package statement at the top of your Java files if you do.
    Websphere says it caught an unhandled exception. Instead of having your method throw and Exception put your code in a try-catch block and then print a stack trace to see if it says anything when it trys to read and write data.
    Try{
        PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("doUpload.txt")));
        ServletInputStream in = request.getInputStream();
        int a=0;
        a=in.read();
        while (a!= -1){
            pw.print((char) a);
            a=in.read();
        pw.close();
    }catch(Exception e){
      e.printStackTrace();
    }Sorry I can't really give you more help.
    -S-

  • When I try to upload a file it goes through the correct proceedure, but does not change the remote file i.e.Index.htm

    Hi
    I have an uploading problem to the server. The problem is when I try to upload a file it goes through the correct proceedure,
    but does not change the remote file i.e.Index.htm, or three stages1.htm.
    My Localroot folder is C:\Gods Plan Web\
    The site map layout is C:\Gods Plan Web\Index.htm
    The folder for the remote site is /public_html/
    Should the local root folder mirror the remote site, i.e./public_html/
    if this is so, what should I put into the
    (a) Local Root Folder box?
    (b) site map layout box?
    The FTP is performing well other than changing the intended file.

    You should be uploading only the contents of your local root to the public_html folder (remote root).
    The index.html you use as your site's home page needs to be in your site root. If you look at your Files window in DW, you should have something like the following...
    Site - Whatever you named your site
         index.html
         images
         pages
              page1.html
              page2.html
    If you have any folder between Site - and the index.html page, like...
    Site - Whatever you named your site
         mywebsite
              index.html
    It will upload to the public_html while still in that folder, so to find your page online, you would need to type something like...
    www.mydomain.com/mywebsite
    public_html should NOT appear within your local files and if it existed there, would cause a redundancy if uploaded. You would need to type www.yourdomain.com/public_html to see the uploaded pages.
    If you could post a screen shot of your expanded Files window while connected to the server (just connect and click the Expand button in Files, don't drill down into any of the directories), we may be able to see the issue.

  • Uploading multiple files into wwv_flow_files.

    Hi,
    I've been happily using the apex file browse button functionality to upload files into the wwv_flow_files table and moving them over to my app specific tables for some time now.
    I was wondering; Is there a straight forward way of uploading all the files in a specified folder into the wwv_flow_files table in a single process; Rather than having to upload them one at a time?
    Cheers,
    Yog.

    Ok. I've tried creating a new DAD by following the instructions here:
    http://www.oracle-base.com/articles/10g/FileUploadDownloadProcedures10g.php
    I've tried various combinations but my lack of experience is letting me down I think.
    I may not even be on the right tack.
    I'm trying to upload a file to a databse table through some kind of automated process. i.e. bypassing the need for a filebrowse button. Ideally I'd like to be able to pass in a filepath to a procedure and for the file to be uploaded.
    Can anyone help with this???
    Getting desperate.
    Yog

  • How to upload Excel file in BI using function module in abap program

    How to upload Excel file in BI using function module in abap program?

    Hi Anuj,
    To upload the file , you can try a standard program "RSEPSFTP" .
    while you execute the program , a selection screen appears in which the inputs should be give as
    RFC destination - The target server name
    FTP command- PUT
    local file - your file name
    local directory - path of your local file
    remote file - your target file name
    remote directory - where it has to be stored
    Hope this is useful for you
    Thanks & regards
    Anju

  • Upload Excel File to SharePoint using VBA

    Hi,
    I copied and modified the code from a friend which he got it from this website forum.
    This apprantely works for some people and not me. Please tell me what I am doing wrong.
    Ignore xxxxxx part of the Sharepoint site. Nothing wrong with the site, i tried many combinations, but I get not response, not even an error.
    Public Const HR_URL = "http://sun.xxxxxx.com/eng/st/Lists/Database%20Change% 20Request"
    Sub test()
    'Upload new Excel sheet to SharePoint
    Call copyToSharePoint(HR_URL, ThisWorkbook.FullName)
    End Sub
    '''''''code block from Forum
    Public Sub copyToSharePoint(sharepointURL As String, filePath As String)
    'On Error GoTo errhandler
    'sharePointUrl should not end in a "/"
    'Initialize Variables
    Dim LlFileLength As Long
    Dim Lvarbin() As Byte
    Dim LobjXML As Object
    Dim LvarBinData As Variant
    Dim LstrFileName As String, PstrFullfileName As String, PstrTargetURL As String
    Dim fileName As String, lenFileName As Long
    'Extract file name
    lenFileName = Len(filePath) - InStrRev(filePath, "\")
    fileName = Right(filePath, lenFileName)
    'Check that the webUrl ends in an "/"
    If Right(sharepointURL, 1) <> "/" Then
    sharepointURL = sharepointURL & "/"
    End If
    '**************************** Upload binary files *****************
    Set LobjXML = CreateObject("Microsoft.XMLHTTP")
    PstrFullfileName = filePath
    LlFileLength = FileLen(PstrFullfileName) - 1
    ' Read the file into a byte array.
    ReDim Lvarbin(LlFileLength)
    Open PstrFullfileName For Binary As #1
    Get #1, , Lvarbin
    Close #1
    ' Convert to variant to PUT.
    LvarBinData = Lvarbin
    PstrTargetURL = sharepointURL & fileName
    ' Put the data to the server; false means synchronous.
    LobjXML.Open "PUT", PstrTargetURL, False
    ' Send the file in.
    LobjXML.Send LvarBinData
    Set LobjXML = Nothing
    Exit Sub
    errhandler:
    If Err.Number = 53 Then
    MsgBox "Excel was unable to create the HR file to submit to SharePoint. " & vbNewLine & _
    "Please check that you are not running out of disk space and that no MS Office add-in is causing issues with Excel.", vbCritical, "File Error"
    Exit Sub
    Else
    MsgBox "Your HR could not be submitted to SharePoint. The following error occurred:" & vbNewLine & _
    "Error " & Err.Number & ": " & Err.Description, vbCritical, "Error Uploading to SharePoint"
    Exit Sub
    End If
    End Sub

    I have made the following code work successfully on a Windows 8 machine with the VBA executing from an Excel 2010 file and the file you want to upload going to a SharePoint 2010 site. If you don't need to use SP content types then simply
    take that out of the code. Also, pay attention to the FieldInformation as the Field Display names and Field Internal names can sometimes be different. Cheers.
    Public Sub copyDocToSP()
    Const strLocalFile = "C:\temp\myLocalFile.pdf"
    Const spBASE_URL = "https://thesharepointdomian/sites/yoursite/"
    Const spDOC_LIB = "Your SP Doc Library Name"
    Const spFILE_NAME = "FileNameOnceOnSharepoint.pdf"
    Const spCONTENT_TYPE = "0x000000000000000000000000000000000000000"
    Set ObjectStream = CreateObject("ADODB.Stream")
    Set ObjectDOM = CreateObject("Microsoft.XMLDOM")
    Set ObjectElement = ObjectDOM.createElement("TMP")
    Set ObjectHTTP = CreateObject("Microsoft.XMLHTTP")
    'Reading binary file
    ObjectStream.Open
    ObjectStream.Type = 1 'Type Binary
    ObjectStream.LoadFromFile (strLocalFile)
    BinaryFile = ObjectStream.Read()
    ObjectStream.Close
    'Conversion Base64
    ObjectElement.DataType = "bin.base64" 'Type Base64
    ObjectElement.nodeTypedValue = BinaryFile
    EncodedFile = ObjectElement.Text
    'Build request to load document
    strURLService = spBASE_URL + "_vti_bin/copy.asmx"
    strSOAPAction = "http://schemas.microsoft.com/sharepoint/soap/CopyIntoItems"
    strSOAPCommand = "<?xml version='1.0' encoding='utf-8'?>" & _
    "<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>" & _
    "<soap:Body>" & _
    "<CopyIntoItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>" & _
    "<SourceUrl>" + strLocalFile + "</SourceUrl>" & _
    "<DestinationUrls>" & _
    "<string>" + spBASE_URL + spDOC_LIB + "/" + spFILE_NAME + "</string>" & _
    "</DestinationUrls>" & _
    "<Fields>" & _
    "<FieldInformation Type='Text' InternalName='Title' DisplayName='Title' Value='this is the title value' />" & _
    "<FieldInformation Type='Choice' InternalName='Our_x0020_Status' DisplayName='Our Document Status' Value='Ready-to-distribute' />" & _
    "<FieldInformation Type='Text' InternalName='ContentTypeId' DisplayName='Content Type ID' Value='" + spCONTENT_TYPE + "' />" & _
    "</Fields>" & _
    "<Stream>" + EncodedFile + "</Stream>" & _
    "</CopyIntoItems>" & _
    "</soap:Body>" & _
    "</soap:Envelope>"
    ObjectHTTP.Open "Get", strURLService, False
    ObjectHTTP.SetRequestHeader "Content-Type", "text/xml; charset=utf-8"
    ObjectHTTP.SetRequestHeader "SOAPAction", strSOAPAction
    ObjectHTTP.Send strSOAPCommand
    MsgBox (ObjectHTTP.responseText)
    End Sub

  • SharePoint 2013 Foundation error when uploading Excel files

    Hello 
    I have a specific problem. I have an xlsx file that I cannot upload in SharePoint. Normally our SharePoint can upload Excel files and other file formats normally but this one has data with nearly 5000 rows. The size of the file is less then 500 KB. The error
    message is: "The URL is invalid. Perhaps it refers to a nonexistent file or folder, or it refers to a valid file or folder in the current Web." When I am uploading this file I am getting the same error message in every library. When I save
    the file as a 97-2003 compatible xls then it works. Sometimes even Excel files with Macros won't upload. 
    Kind regards
    ivicapro1987

    Hi,
    This issue occurs when the Version column is configured as an Indexed Column. 
    To work around this issue, remove the Version column from the list of Indexed Columns for the list that has this issue. To do this, follow these steps:
    Browse to the list where the issue exists.
    In the ribbon, click the Library tab, and then click
    Library Settings.
    In the fields list, click Indexed Columns.
    In the Indexed Columns list, click Version.
    Click Delete, and then click OK.
    Upload any files that you previously experienced the issue with.
    Reference:
    https://support.microsoft.com/kb/2796640?wa=wsignin1.0
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Upload failed your changes were saved but could not be uploaded because of an error. you may be able to upload this file using server web page. save a copy

    Hi All,
    upload failed your changes were saved but could not be uploaded because of an error. you may be able to upload this file using server web page. save a copy button.
    This is the issue which I am facing while working with SharePoint 2010. In a sharePoint 2010 document library I am having an excel file and I am trying to open it from Windows 7 and is office 2010.
    I cam e across few suggestion as mentined below but unable to find the location where to do
    Go to Resource Policies > Web >
    Rewriting > Custom Headers > (if 'Custom Headers' is not visible, click
    Customize on the right top to enable the view).
    Create a new policy with the Resource as <fully qualified domain name of the SharePoint server:*/*> (for example https://sharepoint.juniper.net:*/* ).
    Create the action as Allow Custom Headers.
    Apply the settings to the required roles.
    Please suggest.

    Hi rkarteek
    All things you have to do is as follows:
    1. Open regedit.exe
    2. Naviagate to following key:
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\14.0\Common\Internet]
    3. Click Edit Menu -> New -> DWORD with name of "FSSHTTPOff"
    (without quotes)
    4. Click on "FSSHTTPOff" and enter value of 1
    5.
    Close any Office Applications and browser sessions
    6. Try to reopen your document (no more read only or failure to upload)
    have a nice day!

Maybe you are looking for

  • Cancelled billing document number missing in document flow

    Hello Experts, there is a MAM sales order in which one line item created as a separate billing document is cancelled.however in the document flow the cancelled billing document is not visible.any suggestions how to slove the issue? Regards, Raj

  • Read confirm in Outlook Express

    Hi experts i'd like to know if there is  a way to disable the "read confirm" in Outolook Express when a buyer recives a Questionnaire like email attachment for a Survey. The questionnaire has been sent from Enterprise Portal Application with SRM 7.0

  • I want to use a Netgear router instead of Airport Express...

    I'm trying to create a network of my Mac and my wife's Windows (Vista) laptop, really just so we can print wirelessly from the laptop. Currently my cable broadband modem is linked to Airport Express which "feeds" the Mac. I'd like to remove the Airpo

  • BI content for E-sourcing in BI 7

    Hi, I have to activate e-sourcing standard reports in BI. Any idea where shall I get BI content for e-sourcing (under which application componnent) ?

  • Computer crashed, web site is Live but the file I open isn't up to date

    I pulled it off the FTP server so it should be identical but its missing elements? So then I went to my backup from yesterday and opened that and it says the same thing. Any suggestions? I exported the html site to go live. So that is the one that sh