ADF mobile: how do I upload a file using the rest adapter api

Hello,
I want to upload files using the rest adapter. How would I upload files such as pdfs, images (png, jpg ..) etc.. Some code would be appreciated.
Thanks,

Thanks Frank,
The back-end is functioning in the following way (using Jersey and handling input streams):
    @POST
    @Path("/uploadFile")
    @Consumes(MediaType.MULTIPART_FORM_DATA)
    public Response uploadFile(@FormDataParam("file") InputStream uploadedInputStream, @FormDataParam("file") FormDataContentDisposition fileDetail) {
        String uploadedFileLocation = "D:\\temp\\uploadsTest\\" + fileDetail.getFileName();
        // save it (this function reads from the input stream)
        writeToFile(uploadedInputStream, uploadedFileLocation);
        String output = "File uploaded to : " + uploadedFileLocation;
        return Response.status(200).entity(output).build();
     Is there a way to send data over a stream?
     Thanks,

Similar Messages

  • Hi, how do i share big files using the creative cloud , it says download the crative cloud connection, but then sends me nowhere that says that

    hi, how do i share big files using the creative cloud , it says download the crative cloud connection, but then sends me nowhere that says that

    Hi Jonty, check the file size limit:  Creative Cloud Desktop application FAQ
    You can also check the details around sharing and collaborating files: Sync and share files and folders with collaborators | Adobe Creative Cloud tutorials
    Atul_Saini

  • How can I upload a file to the server where I save the Java Web Start Files

    Hello,
    Does anyone knows how to upload a file to the directory where I save the JAR files through the Java Web Start program. Thanks you

    ftp

  • How to read two text files using the Read from spreadsheet.vi and then plot it

    I need to read two text files using the read from spreadsheet function and then plot these files over time.
    The file with the .res extention is the RMS values (dt and df) and the second file contains the amplitude of a frequency spectrum.
    I really appreciate any help..thanks
    Attachments:
    RMS.txt ‏1 KB
    FREQUENCY.txt ‏1 KB

    From NI Example Finder:
    Write to Text File.vi
    Read from Text File.vi
    Jean-Marc
    LV2009 and LV2013
    Free PDF Report with iTextSharp

  • How to Run teststand sequence file using the LabVIEW

    Hi
    I want the execute the Teststand Sequence file using the LabVIEW .Net containers.I didnt find out the Execution Parameter in the .Net Container.Do you any suggestion regarding this question.Please let me know.
    Jayavel

    TestStand comes with loads of Operator Interface examples some simple, some full fledged. You can find it in teststand public folder win7 path here:C:\Users\Public\Documents\National Instruments\TestStand 2010 SP1\UserInterfaces
    You can take these examples or use ideas from here, also read the teststand reference manual. It has a section about Operator Interfaces.
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

  • How do I upload UDF files using OS X upload window?

    I'm trying to upload a UDF file (a type of disc image) to a DVD-printing website. The problem is, every time I select it in the OS X upload window and click "Open," it just opens it in the window like a folder and presents me with the first level of its contents.
    I don't want to navigate into the file, I want to upload it as a whole. I can't ZIP it or anything, as the website will take the file it receives and burn it onto the DVD as-is, so a ZIP file will result in a DVD containing a ZIP file, and thus be non-playable
    I know the website can receive UDF files, as it specifically lists them as one of the possible filetypes you can upload. I think the OS X upload window itself just doesn't expect it to be possible...
    Is there a way to "force select" that file and upload it, or to somehow tell the computer that I want to UPLOAD the file, not OPEN it?

    UDF is a disc format, not a type of file. It sounds like you have a folder with the contents of a UDF disc. You'll have to clarify with the site operator what kind of file he expects and how to create it.

  • How to log to a file using the log-configuration.xml?

    Hello *,
    I created following log-configuration.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE log-configuration SYSTEM "log-configuration.dtd">
    <log-configuration>
         <log-formatters>
              <log-formatter name="DefaultFormatter" pattern="%25d %-60l %s: %m" type="TraceFormatter"/>
         </log-formatters>
         <log-destinations>
              <log-destination count="10" effective-severity="ALL" limit="1000000" name="DefaultDestination" pattern="FDLB_GUI.%g.trc" type="FileLog">
                   <formatter-ref name="DefaultFormatter"/>
              </log-destination>
         </log-destinations>
         <log-controllers>
              <log-controller effective-severity="ALL" maximum-severity="FATAL" minimum-severity="DEBUG" name="DefaultController">
                   <associated-destinations>
                        <destination-ref association-type="LOG" name="DefaultDestination"/>
                   </associated-destinations>
              </log-controller>
         </log-controllers>
    </log-configuration>
    From a Web Dynpro view I want to use the log-controller. I'm using the default logger:
    Logging location.
      private static final com.sap.tc.logging.Location logger =
        com.sap.tc.logging.Location.getLocation(EinstiegView.class);
    In the wdInit method I want to log a simple message:
      public void wdDoInit()
        //@@begin wdDoInit()
        logger.setEffectiveSeverity(com.sap.tc.logging.Severity.ALL);
        logger.fatalT("test logging to new file logger");
        //@@end wdDoInit()
    I see the message in the defaultTrace.0.log, but my own log file doesn't appear.
    How to address the log-controller of my log-configuration.xml?
    Thanks in advance,
    Jürgen Dufner

    Hi,
    I guess the follwing part of your log-configuration is wrong:
    <log-controller
    effective-severity="ALL"
    maximum-severity="FATAL" m
    nimum-severity="DEBUG"
    name="DefaultController">
    Try to change in log-configuration the value for name in <log-controller> to the start sequence of the packages to be logged. E.g., all our packages should start with com.yourcompanyname.projectname
    To log all messages from classes in these packages make the name = com.yourcompanyname.projectname.
    Hope that helps,
    Regards, Astrid
    Therefore I list

  • How to rename a XML file using the file/FTP adapter

    Dear All,
    I am trying to rename a file using VARIABLE NAME SUBSTITUTION.
    My structure:
    <ns1:MSg xmlns:ns1="http://www.mycomp.inf.br/msr">
      <ns1:MSgVal type="A" Id="188549">
        <ns1:cab>
          <ns1:PO>4500000000</ns1:cPO>
          <ns1:BI>90000000011</ns1:cBI>
        </ns1:cab>
      </ns1:MSgVal>
    </ns1:MSg>
    How do I do to get the value 188549 from the field Id that is into the tag MSgVal?
    I created a variable var1 and my reference is:
    var1 --> payload:ns1:MSg,1,ns1:MSgVal,1,Id@,1
    I am getting the error:
    Could not process due to error: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: var1
    Regards,
    Fernando

    Hi,
    Like pinted by Michal, use Adapter Specific Identifers.
    In your mapping set the file name using the code in this link and then in your Receivr File Adapter select the Adapter Specific Identifiers --> FileName .
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
    Regards
    Bhavesh

  • How to sign multiple jar files using the same certificate..?

    hi,
    I want to run my application using Java Web Start.. i am using around 16 different jar files out of which around 13 are 3rd party component jars. I want to sign these jars using the same certifcate..., i am using the follwing code to sign the jars:
    (for the jar file ischeduler.jar)
    keytool -genkey -alias signFiles91 -keystore dtss -keypass dtss1351 -dname "cn=dtss" -storepass decisioncraft
    jarsigner -keystore dtss -storepass decisioncraft -keypass dtss1351 -signedjar signedischeduler.jar ischeduler.jar signFiles91
    keytool -export -keystore dtss -storepass decisioncraft -alias signFiles91 -file ischeduler.cer
    keytool -import -alias DCA2 -file ischeduler.cer -keystore Impischeduler -storepass ischeduler
    (for the jar file ischedulerclient.jar)
    keytool -genkey -alias signFiles92 -keystore dtss -keypass dtss1351 -dname "cn=dtss" -storepass decisioncraft
    jarsigner -keystore dtss -storepass decisioncraft -keypass dtss1351 -signedjar signedischedulerclient.jar ischedulerclient.jar signFiles92
    keytool -export -keystore dtss -storepass decisioncraft -alias signFiles92 -file ischeduler.cer
    keytool -import -alias DCA3 -file ischeduler.cer -keystore Impischeduler -storepass ischeduler
    but when i use the above signed jars in my application i get an error saying:
    "jars not signed by the same certificate"
    can someone plz tel me wher is the error....thanx
    andy

    Well for mulitple signing of jar files you can use ANT tool. Its easier and faster.
    Regarding the present problem -- hmm.. well it looks like you are using 2 different alias names for signing the jar file. Try using the same alias name and that might solve your problem.
    regards
    Saby

  • How can we upload ftp file using servlets

    I have to write the code to upload file from an FTP location.
    How can I do it as I'm having no idea.
    Message was edited by:
    urssireesh

    The Apache Commons project has a couple of components that may help. Check out the net or vfs components:
    http://jakarta.apache.org/commons/components.html
    Also look on the SourceForge site for any Java FTP projects that you could use.

  • Send a XML file using the mail adapter

    HI ,
    I have to send an incoming xml message as a attachment in the mail using mail adapter .
    how can I achieve this .
    Thanks
    Nikhil

    Hi Nikhil,
    Just check with this blog-
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    Creating mails with attachments from flat text files
    Hope this helps..
    Regards,
    Moorthy

  • Uploading a file to the web server

    How can i upload a file to the web server using JSP.

    hello sir,
    Could U even tell me performance which one is better.
    U have mentioned that Multipartrequest is Complex for Beginers,
    but as far as performance is concerned which is better.
    If Taglib is used is it error Free , as I do not know much abt taglib.
    have just read a little abt it , have never created my own Custome Tag.
    Could U just Guide me which is the best site where I could get know a little abt Taglib.An easy tutorial where I could read and start working on My application.
    I have been given a Deadline. So Please help me man.
    If U have the source Code for Uploading of a File Please Cut Paste it.
    I have to finish the project on time .
    Please
    With Regards
    Eklavya

  • How to repair corrupted xp files with the Toshiba recovery dvd pkg

    Hello all, my Satellite a105-s4054 has some corrupted xp os files.  Please advise on how to repair only these files using the recovery dvd pks included with my sytem.  I would rather not have to do a complete format and install.   And it is now obvious which of the individual files listed should be replaced to repair the corrupted files. 
    Is there  way to just replace the corrupted files?
    Thank you

    Satellite A105-S4054 
    ..replace the corrupted files?
    If they are system files, this will fix them.
       Description of Windows XP and Windows Server 2003 System File Checker (Sfc.exe)
    -Jerry

  • How to create a listener using the new MDM API

    Does anyone have an example on how to create a addrecord listener using the new MDM API?

    Refresh!
    Hi all,
    Looking for some sample codes on the same
    Best regards,
    Arun prabhu S

  • How to Upload a File on the Server

    Hi,
    I want to upload a file on the server from Windows Mobile Application. Can anyone please suggest me a way to do so?
    Thanks in advance, 
    Saheli Sur

    Following links should also help
    http://blog.anthonybaker.me/2013/06/how-to-upload-file-from-windows-phone.html
    http://stackoverflow.com/questions/19954287/how-to-upload-file-to-server-with-http-post-multipart-form-data/20000831#20000831
    Gaurav Khanna | Microsoft .NET MVP | Microsoft Community Contributor

Maybe you are looking for

  • How to add new fields  to a table control in a standard transaction JHA3X

    Hi All,         We have a requirement where we have to add two new fields  to  a table control         in a standard transaction JHA3X .        We don't want any changes into our standard code and also we don't have any USER EXIT for that        scre

  • App store and iTunes store both not working properly

    I use a mac. They are both extremely sluggish. The app store is the worst and most anoying. I already have tried lots of things including flushing cashes, removing temp files, turning of genius in itunes. No result. Something is going wrong with my i

  • Payment of commission.

    Hello Dear sir can you give me a detailed idea about the Payment of commission? Thanks in advance. Regards Dileep Singh

  • SVG show stopper?

    Have what our developers consider is a serious lack of functionality with the HTMLDB SVG renderer. Serious enough that they want to go back to the JBOSS route... Two issues. 1. The SVG hotspots are based on the line and not the actual marker on the l

  • Testing a File sender Scenario

    How do I test this? I have a Scenario where the outbound adapter is a File FTP and the Poll Intervals is 60sec. Everything seems okay but I cannot see the status in sxmb_moni Is there maybe a way to manually trigger this event?