How to upload the files

how to upload the files from javascipt.can any body send the code for that.

You can't upload files with Javascript, that would be a huge security hole. At highest you can use Javascript to submit a form with a file field, but the user still have to select the file himself.

Similar Messages

  • How to upload the file from website into R/3

    Dear Experts,
              I want to post the data in r/3 using bdc.but flat file is available in some website for eg.'www.sap.com'.how to retrieve the flat file from the website and how to upload the data from website to r/3.
    It is very urgent please help me.
    Thanks & Regards,
    Ashok.

    Hi Ashok,
        We cannot directly pulled data from website. we need to activate webservices and rfcs. Better you could asked to your Basis guy that he knows or not. If not then do sdn you will get the appropriate answer. I can only say that its possible and we can download from website.
    Regds,
    Rakesh

  • How to upload the file without using java components?

    Hello,
    I need to upload the file using JSP, but I don't want to use java componets(such as
    jspsmart).
    Who can tell me how to realize it? This issue is very important to me,
    thanks all in advance!

    make you're own servlet using the multipartrequest from o'reilly.
    easy and simple, no jspsmart, only 1 jar file and some descent programming.
    I use it like that...

  • How to upload the files of a directory to a server at one time?

    in a jsp page ,the user choose a directory ,then I want to upload the files of the directory to a server at one time.How to do this?Thanks!

    You create multiple file input fields and you have them select each file they want.
    Or tell the user to zip the directory and upload the zip file.
    Or use a signed applet to get all the files and send them.
    There's no way for the browser to select a directory.

  • How to upload the file in the virtual disk?

    I have created a virtual drive called Z.But I don't upload file(image).
    I could not find how to write the file path.
    <cfif len(attributes.background_file)>
    <cfset upload_folder =( ".....")">
      <cffile action = "upload"
        fileField = "background_file"
        destination = "#upload_folder#"
        nameConflict = "MakeUnique"
        mode="777">
      <cfset file_name = "#createUUID()#.#cffile.serverfileext#">
      <cffile action="rename" source="#upload_folder##cffile.serverfile#" destination="#upload_folder##file_name#">
    <cfif isdefined("attributes.old_background")>
      <cf_del_server_file output_file="settings/#attributes.old_background#" output_server="#attributes.old_background_server_id#">
    </cfif>
    </cfif>

    I adduce that my computer disk screen. if I want to upload file to virtual file system  Must I create a RAM disk-based file.Because all codes include ram://?
    http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSe9cbe5cf462523a0-70e2363b121825b20 e7-8000.html
    I aduce my computer disk screen. My virtual disk name is Z.Dou you have any idea abaut this subject.
    I apologize to anyone.

  • How to upload the files using struts

    Hi all
    My requierment is to upload the files from the client machine and save it on the server, the file size must not increase more than 250 MB and to validate that we cannot do validation on the client machine so we have to validate it on the server side. below is my code kindly go through it if there is any problem in Bussiness Logic
    1>Upload.jsp
    2>UploadForm.java
    3>UploadAction.java
    *1>Upload.jsp*
    <%@ page language="java"%>
    <%@ page import="java.io.*"%>
    <%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
    <html>
    <body bgcolor="white">
    <form name="uploadForm" action="TestApplication/upload" method="post" enctype="multipart/form-data">
    <table>
    <tr>
    <td align="center" colspan="2">
    <font size="4">Please Enter the Following Details</font>
    </tr>
    <tr>
    <td align="left" colspan="2">
    <font color="red"></font>
    </tr>
    <tr>
    <td align="right">
    File Name
    </td>
    <td align="left">
    <input type="file"  name="theFile">
    </td>
    </tr>
    <tr>
    <td align="center" colspan="2">
    <input type="submit" value="UPLOAD">
    </td>
    </tr>
    </table>
    </form>
    </body>
    </html>*2>UploadForm.java*
    package com.MyPack.Datamatics;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.upload.FormFile;
    public class UploadForm extends ActionForm
         private static final long serialVersionUID = 1L;
    private FormFile theFile;
       public UploadForm(){}
       * @return Returns the theFile.
      public FormFile getThefile() {
        return theFile;
       * @param theFile The FormFile to set.
      public void setThefile(FormFile theFile) {
        this.theFile = theFile;
    } *3>UploadAction.java*
    package com.MyPack.Datamatics;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.upload.FormFile;
    public class UploadAction extends Action
      public ActionForward execute(
        ActionMapping am,
        ActionForm af,
        HttpServletRequest req,
        HttpServletResponse res) throws Exception{
         UploadForm myForm = (UploadForm)af;
            // Process the FormFile
            FormFile myFile = myForm.getThefile();
            String contentType = myFile.getContentType();
            String fileName    = myFile.getFileName();
              int fileSize       = myFile.getFileSize();
              String data="";
              try{
            java.io.InputStream fileData  = myFile.getInputStream();
             String path="E:/store";
              File f = new File(path);
              java.io.OutputStream outputStream = new FileOutputStream(f+"/"+fileName);
              int temp = 0;
              byte[] buffer = new byte[8192];
              temp = fileData.read(buffer, 0, 8192);
              while ((temp) != -1) {
              outputStream.write(buffer, 0, temp);
                   outputStream.close();
                   data = "file has beeb written to E:/store" + fileName;
                   fileData.close();
              catch (FileNotFoundException fnf)
              { System.out.println("Cannot Found the file");
               System.out.println(data);
              System.out.println("contentType: " + contentType);
             System.out.println("File Name: " + fileName);
             System.out.println("File Size: " + fileSize);
          return am.findForward("success");
    }Thanks in Advance

    [help link 1|http://www.roseindia.net/struts/strutsfileuploadandsave.shtml]
    [help link 2|http://www.roseindia.net/struts/strutsfileupload.shtml]

  • How to Upload the files into the SiteAssets Library by SharePoint Hosted App Model

    I want to upload the Jquery and supported files in to the Site Assest library by SharePoint Hosted Apps,
    I have created a SharePoint Hosted App, added the files in the Modules
    <Module Name="ZoneTabsFiles" Url="SiteAssets">
    <File Path="ZoneTabsFiles\jquery-1.11.2.min.js" Url="jquery-1.11.2.min.js" ReplaceContent="TRUE" />
    <File Path="ZoneTabsFiles\jquery-ui.css" Url="jquery-ui.css" ReplaceContent="TRUE" />
    <File Path="ZoneTabsFiles\jquery-ui.min.js" Url="jquery-ui.min.js" ReplaceContent="TRUE" />
    <File Path="ZoneTabsFiles\ZoneTabs.js" Url="ZoneTabs.js" ReplaceContent="TRUE" />
    </Module>
    The Apps is successfully getting activated but the files are not visible,
    Similarly I want to upload the .webpart file to webpart catalogs.
    <Module Name="ZoneTabsWebpart" List="113" Url="_catalogs/wp" Path="lists\wplib" RootWebOnly="TRUE">
    <File Url="ZoneTabs.webpart" ReplaceContent="TRUE" />
    </Module>
    The Functionality I can achieve Provider Hosted app, but Can it be done by SharePoint Hosted apps,
    Currently the app has the permission of Full Control on Site and Web 
    Thanks in advance

    Hello Ashok,
    you can use JSOM to provision the webpart files in SharePoint hosted app.
    Please see the below article for more details.
    http://www.sharepointnutsandbolts.com/2013/05/sp2013-host-web-apps-provisioning-files.html
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • Uploading the file into sap ( fields are seprerated by ' | '.

    Hi All,
    Plz let me know how to upload the file into sap in which the fields are separated by the symbol ' | '
    sample file format
    Material|Oracle_Item_type
    (89034)|PFG
    001069-000-97|BTF/BTS
    001070-000-97|SRV PTS
    001074-000-00|SRV PTS
    001086-000-97|SRV PTS
    001143-000-97|SRV PTS
    001176-000-97|SRV PTS
    001197-000-97|SRV PTS

    data: gt_txtar TYPE truxs_t_text_data.
    CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'
              EXPORTING
                i_field_seperator    = ' | '
              TABLES
                i_tab_sap_data       = itab
              CHANGING
                i_tab_converted_data = gt_txtar.
    CONCATENATE '/usr/sap/tmp/file.txt' INTO lv_dwnfile.
    OPEN DATASET lv_dwnfile FOR OUTPUT IN TEXT MODE ENCODING UTF-8 .
    loop at gt_txtar.
    TRANSFER gt_txtar TO lv_dwnfile.
    endloop.
    CLOSE DATASET lv_dwnfile .
    Regards
    Sathar
    Edited by: Sathar RA on Sep 1, 2008 9:47 AM

  • How to get the files in presentation server while uploading?

    how to get the files in presentation server while uploading?
    give me the function module name

    Hi,
    PARAMETERS:  P_FILE LIKE RLGRAP-FILENAME DEFAULT C_PRES.  "Prsnt Srvr
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
          DEF_PATH         = P_FILE
          MASK             = ',..'
          MODE             = '0 '
          TITLE            = 'Choose File'
        IMPORTING
          FILENAME         = P_FILE
        EXCEPTIONS
          INV_WINSYS       = 1
          NO_BATCH         = 2
          SELECTION_CANCEL = 3
          SELECTION_ERROR  = 4
          OTHERS           = 5.

  • How to upload the data from excel(3 tabs) file to sap environment

    Hi all,
    This is Mahesh.
    how to upload the data from excel(3 tabs) file to sap environment (internal tables) while doing bdc.

    Hi,
    The FM 'ALSM_EXCEL_TO_INTERNAL_TABLE' makes it possible to load a worksheet into an internal table in ABAP.
    However, if you want to get the data from several worksheets, I think you are stuck with OLE access to your Excel Workbook...
    You can find a solution for 2 worksheets in this post :
    TO UPLOAD DATA FROM 2 EXCEL SHEETS INTO TWO INTERNAL TABLES
    I think you can easily modify it to handle any number of worksheets.
    Hope it helps !
    Best regards,
    Guillaume

  • I have purchased a monthly subscription to Adobe PDF pack so that i can edit a PDF file, i have uploaded the file and its now in "my assets". how do i now edit this file??

    I have purchased a monthly subscription to Adobe PDF pack so that i can edit a PDF file, i have uploaded the file and its now in "my assets". how do i now edit this file??

    You can't edit a file with PDF Pack, but you should be able to convert it to a Word document, and if you are really lucky edit THAT and make a new PDF. Don't expect too much though!

  • How to upload a file which may contain text as well as image to the server using windows phone 8 application ?

    How to upload a file which may contain text as well as image  to the server using windows phone 8 application ?

    You're going to need to give way more detail about the situation before we can help.

  • How to upload the invocie verify from excel file?

    How to upload the invocie verify from excel file?
    there is more items requied to input.
    refer to MIR7
    thanks

    How to upload the invocie verify from excel file?
    there is more items requied to input.
    refer to MIR7
    thanks

  • How to use the applet to upload the file ?

    I am facing a problem that , I don't know how to use applet to upload the file to server .
    I have the code to upload the file by using servlet .
    However , I want to use applet to upload the file .But , the format of servlet I have used is "multipart/form-data"
    but applet can not do so , I think it is the header of the data . I don't know what can I do .....
    Can anyone give me some suggestion or coding to write the file upload by using applet ?
    Besides , using the socket are there any other choices ?
    thx a lot !!!!

    Well, to upload files you need to
    Server App - running on the webserver
    1. Open a socket
    (Study the classes Socket, InputStream, OutputStream in the Java API)
    2. Wait for connection.
    3. Open FileOutputStream
    3. Read data from InputStream, Write to FileOutputStream
    4. Close InputStream and FileOutputStream
    Applet
    1. Open a filedialog (Swing, AWT)
    2. Open file (FileInputStream)
    3. Connect to uploadServer (steps described above)
    4. Read FileInputStream, write OutputStream
    5. Close File and Socket
    This is just simpl and basic terms get you on the right track
    Jonas

  • How to upload the text file into smart forms

    Hi Experts,
    can any one tell me that how to upload  the text file or html file to SAP Script form or smart forms
    i have download the form info from SAPscript form.to text file.
    now i want to upload the text file to smartforms.
    is it possible ? if it is possible, then how can i do that ?
    Thanks in Advance.
    Regards,
    Mani

    <b>For Scripts</b>
    Go to SE38. Put in the program name RSTXSCRP. Execute it.
    Mode(Export/Import) : Import.
    Give the file name from which you want to upload and execute it.
    <b>For Smartforms</b>
    TCode : smartforms.
    Give the form name.
    Utilities-->Upload form.
    Reward points if helpful.
    Thanks
    Aneesh.

Maybe you are looking for