How to upload image along with timestamp

Hi all,
I need to upload an image (byte array) and its timestamp to server which has jsp/servlet. But having trouble to transmit both in the same request.
In actionscript, I use URLRequest and URLLoader and upload the image without problem, however, I don't know how to upload the timestamp in the same request. I tried to build a ByteArray to contain both timestamp and the image, but I couldn't convert the Date.getTime() to byte[] correctly. The only function in ByteArray to input 8 bytes is writeDouble, but it doesn't embed the time correctly.
Where is the best way to handle this?
Thanks a lot

Thanks for the reply.
Can you shed some light how to transfer the file over? I use URLLoader with POST method and set the request data to a bytearray which is the image bitmapdata bit array. How do I send the the file name over? (parse the filename is not a problem)
Thanks,
Rovi

Similar Messages

  • How to store images along with text in the database    ------its urgent

    i'm developing an application which will be similar to to the page which we use for posting the forum. if in a text field we enter some text and an image how does we store the whole the information in database which in the textarea (both the text entered and the image) and how it can be extracted as if the user entered

    Hi,
    Refer thsi link, this may help you
    http://www.sap-basis-abap.com/saphr003.htm
    Call the FM BDS_BUSINESSDOCUMENT_CREATEF to upload the images from System.
    codeLOGICAL_SYSTEM
    CLASSNAME PICTURES
    CLASSTYPE OT
    CLIENT 321
    OBJECT_KEY ZIMAGE [/code]
    and the table parameter Files pass
    code DOC_COUNT 00000001
    COMP_COUNT 00000001
    COMP_ID
    DIRECTORY C:\
    FILENAME WINTER.JPG
    MIMETYPE
    [/code]
    now check it.
    here you can upload multiple images inside a loop call the FM.
    Regards,
    Shiva.

  • How to upload Images in Forms 6i

    Dear all,
    How to upload images in Forms 6i and save it in database. Please anyone help me with example.
    Thanking you
    Shekhar

    why do you need an active/X for this?
    Can't you just create 2 default blocks on dept and on emp.
    Use the relationship wizard to define the relation. and set the number of records displayed for the emp block to 10?
    This will give you all you need with no hussle.

  • How to upload image files in sqlserver from jsp

    hi friends,
    i want to upload images to sqlserver how will i store url of the image or dorectly store the file in binary format, if we store in related path,plese give some ideas on store that paths in data base and how we store that image files in user directories.
    bye

    hi jay , I know that concept , but i dont know how to upload image files to server Please help me
    here i am giving my problem
    If any user register with site, he has the option to upload his image to the site, so i am using in html file upload option, But i dont know how to store that iamge into the server
    please give me suggestion
    regards
    sudhakar

  • How to upload image using JSP

    hi,
    i am confronting a problem how to upload image from local PC to web server . I am using Tomcat 4.0
    please help me by sending code
    thanks

    Hi,
    Here is the solution for uploading images and displaying images. I am using struts with JSP, so this code has a Action and ActionForm class. You can put the same code in Java Beans or Servlet class to run it. This code has two JSP files - one for Upload (upload.jsp)and other for Image(image.jsp) display. It has a Servlet also to display the image. Here is the code file wise.
    Upload.jsp **********************************************************
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:html>
    <head>
    <title>New Page 1</title>
    </head>
    <body>
    <html:form action="uploadAction.do" enctype="multipart/form-data" method="POST">
    <p>File to upload   
    <html:file property="fileUpload" size="20"/></p>
    <p><html:submit value="Upload" property="upload"/></p>
    <p> </p>
    <p><html:img src="image.jsp"/></p>
    <p> </p>
    </html:form>
    </body>
    </html:html>
    Image.jsp*****************************************************************
    <jsp:useBean id="upload" class="uploadtest.uploadActionForm" scope="session">
    </jsp:useBean>
    <%
         byte[] rgb=(byte[])session.getAttribute("byte");
         request.setAttribute("byArr", rgb);
    %>
    <!--
    The image data is now on the request object.
    Forward the user to the showImage servlet.
    That servlet will process and display the image data contained on the request object.
    -->
    Image is<p>
    <jsp:forward page="/showimage" />
    Struts Action Class - UploadAction.java **************************************************
    import javax.servlet.http.*;
    import java.io.*;
    import org.apache.struts.upload.FormFile;
    import org.apache.struts.action.*;
    public class uploadAction extends Action {
    public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
    uploadActionForm upload = (uploadActionForm) actionForm;
    try {
    int size=upload.getFileUpload().getFileSize();
    //if (image != null) {
    byte[] byteArr = new byte[size];
    //Create an input stream to read the uploaded file.
    ByteArrayInputStream bytein = new ByteArrayInputStream(upload.getFileUpload().getFileData());
    // Load the input stream into the byte Array.
    bytein.read(byteArr);
    // Close the input stream.
    bytein.close();
    // Load the byte[] into the content field.
    upload.setContent(byteArr);
    HttpSession ses=httpServletRequest.getSession();
    ses.setAttribute("byte",byteArr);
    return actionMapping.findForward("success");
    } catch (Exception ex) {
    ex.printStackTrace();
    return actionMapping.findForward("success");
    Struts ActionForm class ---uploadActionForm.java***************************************************
    package uploadtest;
    import org.apache.struts.action.*;
    import org.apache.struts.upload.*;
    import javax.servlet.http.*;
    public class uploadActionForm extends ActionForm {
    private FormFile fileUpload;
    private byte[] content;
    public FormFile getFileUpload() {
    return fileUpload;
    public void setFileUpload(FormFile fileUpload) {
    this.fileUpload = fileUpload;
    public byte[] getContent()
    return content;
    public void setContent(byte[] theFile)
    this.content = theFile;
    public ActionErrors validate(ActionMapping actionMapping, HttpServletRequest httpServletRequest) {
    /**@todo: finish this method, this is just the skeleton.*/
    return null;
    public void reset(ActionMapping actionMapping, HttpServletRequest httpServletRequest) {
    Servlet to display image --- ShowImage.java ********************************************************
    import java.io.*;
    import java.util.*;
    public class ShowImage extends HttpServlet {
    //Initialize global variables
    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    byte[] rgb = (byte[]) request.getAttribute("byArr");
    if (rgb != null)
    response.setContentType("image/gif");
    OutputStream stream = response.getOutputStream();
    stream.write(rgb);
    else
    response.setContentType("text");
    response.getWriter().write("attribute byArr not found");
    This code will enable to to upload and display the image. If you know Struts, then you can write the Struts-Config.xml file by yourself. Other wise write to me, I will send you that. If you want to save the image in database, then you have to keep it as BLOB datatype is database. For database you need to send the byte array in the uploadAction.java file to database. Database will keep the image as binary.
    Thanks
    Amit

  • Displaying Images along with Drill Drown Results

    I'm using MS access 2003 as my data base and CF as the web
    language. I cannot find a topic in reference to displaying Images
    along with Drill down results. My tables in access have a OLE
    object included however I am clueless as how i can display the
    images with my drill down results. I just cannot find a link that
    talked about this issue already. Does anyone have a link to this
    forum topic?

    College Kid wrote:
    > I'm using MS access 2003 as my data base and CF as the
    web language. I cannot
    > find a topic in reference to displaying Images along
    with Drill down results.
    > My tables in access have a OLE object included however I
    am clueless as how i
    > can display the images with my drill down results. I
    just cannot find a link
    > that talked about this issue already. Does anyone have a
    link to this forum
    > topic?
    >
    Sorry, no link, but I think you want to be looking at the
    <cfimage...>
    and|or the <cfcontent...> tags. One or both of these
    tags should allow
    you to deliver the image from the database to the client.
    You are doing this in a bit of an unusual, but not unheard of
    way. Most
    people just store the image file in a handy directory
    accessible to the
    web server and then store the name|URL to this image as text
    in the
    database.
    But it is definitly possible to server up binary image data
    as well.
    Though I have never heard of this in conjunction with MS
    Access and 'OLE
    objects'. I usually hear this discussed in relation to more
    enterprise
    database management systems and BLOB [Binary Large OBjects]
    data fields.

  • Displaying images along with data on downloading from excel

    Hi All,
    I need to show images along with data in the excel sheet when user clicks downld to excel button.  Is there possible way to show the images in excel sheet if, kindly help.
    Thanks & Regards
    Jaspreet Kaur

    Hi Vinod
    Basically I have a report which needs to be downloaded to excel sheet. For each record there is a particular image in the first column for ex say my colums are img, desc.  Now image column contains an image corresponding to each description.  If its a file, a folder image is there; if its a document, a page image is there etc.  Now i am can display the data of  text fields  in the following manner ie label =new Label(0,RowCount, wdContext.nodeVn_PortalExcel().getVn_PortalExcelElementAt(i).getVa_Role(), PortalRoleDataFormat);
    PortalReportsheet.addCell(label);
    but how do i display the image in the excel sheet?
    Is it possible to do so, if so please provide assistance.
    Thanks & Regards
    Jaspreet Kaur

  • IOS how to upLoad image

    IOS how to upload image, how the
    receiving server,can you help me?

    Hi. The iOS library for Azure Storage is currently in planning. In the meantime, please check out the following blog
    http://chrisrisner.com/Mobile-Services-and-Windows-Azure-Storage which may help with your scenario. Thanks.

  • How to get spool along with e-mail or FAX

    Hi,
    I have a requirement where i have to produce a spool even i go for e-mail or FAX option when the script is triggered.
    I am using a standard program where it is coded to have either of the option. i.e. either we have to go for a printer or e-mail or FAX.
    Could any one suggest me how to get spool along with e-mail or FAX option.
    Thanks in advance.

    Hi,
    check this:-[http://help.sap.com/saphelp_nw04/helpdata/en/a5/28d3b9d26211d4b646006094192fe3/frameset.htm]
    hope u'll get some idea.
    Regards,
    Sneha.

  • How to upload images in to custom table and display them in normal ABAP report?

    Hi Experts,
    Can anyone suggest me ,how to upload images into customised table and display thoes images in normal abap report.
    Thanks in Advance,
    Rgds,
    Anusha

    Hi Experts,
    Can anyone suggest me ,how to upload images into customised table and display thoes images in normal abap report.
    Thanks in Advance,
    Rgds,
    Anusha

  • How to upload images on hard drive to iPad?

    how to upload images on hard drive to iPad?

    You can import them into iTunes then use that to get them onto your iPad.
    You can download the iCloud control panel and use photo stream to get the photos onto your iPad
    You can e-mail them to yourself and them save them from that e-mail
    You can upload them to something like dropbox and then download them onto your pad from there.

  • How to print interest along with dunning letter

    HI  guys  plz
    How to print interest along with dunning letter
    Many thanks to you
    Raju

    Hi,
    ABAP development is required for your requirement. Ask your abaper to develop the programme to print dunning letter along with interest
    Regards,
    Satish Muvva.

  • PLD:  How to decrease Header along with PLD.

    How to Decrease Header along with paper size from A4 to half (Width= 648 Hight= 432),

    I am sorry, but I don't know the solution for your problem - like apparently the rest of the SDK community here.
    This Forum is (mainly) for SAP Business One SDK.
    For questions related to the B1 application itself and around customization the "Implementation" forum in the Channel Partner Solution Network (http://p2p.sap.com/businessoneforum) - or a message to SAP Support - would IMHO be the best options.
    Thanks,
    Frank
    Message was edited by:
            Frank Moebius
    ...but THANKS for the excellent subject you used! I am glad to see someone giving such precise information in the subject!

  • How to improve image resolution with using filters

    how to improve image resolution with using filters?

    image resolution, Please check the below links. They should give you a clear idea about Resizing and resampling images.
    http://helpx.adobe.com/photoshop/kb/advanced-cropping-resizing-resampling-photoshop.html#m ain_Resizing_and_resampling_images
    Understanding Resize vs. Resample | Learn Photoshop CS6 | Adobe TV
    Cheers!
    ~ Arpit

  • How to get command history with timestamp ?

    how to get command history with timestamp ?

    If you are using bash:
    HISTTIMEFORMAT If this variable is set and not null, its value is used as a format string for strftime(3) to print the time stamp associated with each history entry displayed by the history builtin. If this variable is set, time stamps are written to the history file so they may be preserved across shell sessions.
    [SunOS 5.10/bash] [email protected]:/etc/ftpd
    # HISTTIMEFORMAT="%h/%m - %H:%M:%S ";export HISTTIMEFORMAT;history
        1  Aug/08 - 19:07:52 chmod a+rwx /root
        2  Aug/08 - 19:07:52 ll /
        3  Aug/08 - 19:07:52 tail -f /root/mylog.log
        4  Aug/08 - 19:07:52 vi /usr/dt/bin/Xsession
        5  Aug/08 - 19:07:52 cat /root/mylog.log
        6  Aug/08 - 19:07:52 ls /export/home/p661210/.dt
        7  Aug/08 - 19:07:52 ls -la  /export/home/p661210/.dt
        8  Aug/08 - 19:07:52 cat  /export/home/p661210/.dt/errorlog
        9  Aug/08 - 19:07:52 vi /usr/dt/config/C/sys.dtwmrc
       10  Aug/08 - 19:07:52 ls
       11  Aug/08 - 19:07:52 cat Xresources.jds
       12  Aug/08 - 19:07:52 vi /usr/dt
    [SunOS 5.10/bash] [email protected]:/etc/ftpd
    [SunOS 5.8/bash] root@wgls03:/root
    # HISTTIMEFORMAT="%h/%m - %H:%M:%S ";export HISTTIMEFORMAT;history
        1  Jul/07 - 09:02:21 vi /etc/vfstab
        2  Jul/07 - 09:02:21 mount /store
        3  Jul/07 - 09:02:21 cd /store/bnz
        4  Jul/07 - 09:02:21 ls
        5  Jul/07 - 09:02:21 ./BNZ_installBaseSoftware
        6  Jul/07 - 09:02:21 find /usr -name gunzipCheers,
    Andreas

Maybe you are looking for