How to upload multiple images

Hey folks.
     I have 10 file upload files for users to upload up to 10 different images into the same folder, but not sure how i should go about it. I did 10 different inserts, but it seemed very "chicken scratch" type coding. Not sure how to do it any other way, which brings me here. Can someone give me some direction on how to do it better?
I should say i have 10 different upload fields because i need the files to be named something like "page1.jpg, page2.jpg....etc". I could be doing this wrong too. I don't know. Any advice will be great.
Thanks

http://www.raymondcamden.com/index.cfm/2010/3/5/ColdFusion-9-Multifile-Uploader--Complete- Example
^_^

Similar Messages

  • How do I upload multiple images to d-base through a single page?

    I can upload a single image with a form to my MySql database with no problem.  It sends the file name to the database then stores the image in an image file.
    But now I want to upload multiple images in the same way from the same PHP page.  Each multiple upload needs to be stored to a single record (designated user that's logged in).  I have a field for each image in the database.
    This may give you a better idea of what the database looks like:
    Username
    ID
    image1
    image2
    image3
      scmeeker
    5
    dotty.jpg
    hello.jpg
    kitty.jpg
    jdmeeker
    7
    So now I want to upload multiple images for each image field.  When it works correctly, it should send the name of the image file to the proper field and then send the image to the image folder.  I've tried it several ways with no luck at all.
    Any one have any ideas???
    Thanks!

    I think you would be better off having two tables in you database. One would be a users table that has all of the user data including a user id (the primary key for this table and the foreign key for the other table). The second would be an images table. You would use the images table to upload infinite (well, as many as the db can handle) images. The trick, is that each record in the images table would have a foreign key, which would be the user id for the user that uploaded the image.
    This way your users wouldn't be limited to three images but could upload as many as you want to allow them to. The association of the user id, which has to be unique to each record in the users table (there cannot be duplicates, it should be your primary key on the users table), to the user id in any number of records in the images table is what will allow this to work.
    EX:
    The users table
    user_id
    f_name
    l_name
    email
    other_info
    100001
    first
    last
    [email protected]
    100002
    f_name
    l_name
    [email protected]
    The images table
    image_id
    src
    user_id
    10000000001
    /db_imgs/img1.jpg
    100001
    10000000002
    /db_imgs/img2.jpg
    100001
    10000000003
    /db_imgs/img3.jpg
    100002
    10000000004
    /db_imgs/img4.jpg
    100001
    10000000005
    /db_imgs/img5.jpg
    100001

  • Function for uploading  multiple images, say 5000 , of any type?

    Hi,
    I want to upload multiple images which are stored anywhere, be it a local system or a server, to the SAP database just by clicking a single button. The method should be able to pick all the images and check their file types and upload it.
    My concerns are that:
    1. How to specify the path where the images are stored?
    2. How to check the extension of the different files. it is possible that the folder may contain some other file types? So how to distinguish between them?
    3. How to deal when the folders may contain some subfolders?
    4. How to display the uploaded images back to the user?
    Regards
    Amit Kumar Singh

    I would guess its because all of the file fields all have the
    same name. Try naming them dynamically: micro1, micro2, micro3,
    etc.
    A few minor comments about the code
    - Afaik, setting the VALUE has no effect for input fields
    when type="file"
    - FILE is deprecated. Use CFFILE.ServerFile instead
    - You don't need # signs here <cfset numberoffields =
    #cookie.micro#>
    Not tested

  • I am getting a error IO when trying to upload multiple images within wordpress using the flash uploader. I do not get the error when uploading using explorer. The error only appears if I try uploading using firefox....any ideas?

    I am getting a error IO when trying to upload multiple images within wordpress using the flash uploader. I do not get the error when uploading using explorer. The error only appears if I try uploading using firefox....any ideas?

    Logged the call with SAP who directed me to 'Define settings for attachments' in IMG and setting the 'Deactivate Java Applet' & 'Deactivate Attachment versioning' checkboxes - problem solved.

  • How to import multiple images at the same time in illustrator?

    How to import multiple images in a document at the same time in illustrator?
    It's possible?

    Script: Place Multiple Files in Illustrator (Kelso)
    http://kelsocartography.com/blog/?p=2047

  • How to have multiple images on the same screen? like in the movies where you see several actions at

    how to have multiple images on the same screen? like in the movies where you see several actions at the same time ....
    i don't find  a tutorial in adobe tv....
    thanks !!

    The short answer is that you'll put the source clip(s) for each inset on a different video track, all stacked up. Then use the Scale and Position effects (under "Motion" on the Effect Controls panel) to reduce their size and place them where you want.
    If the content of an inset will involve edited content (where you're cutting among various clips or just trimming out unwanted content from a single clip), then you'll probably find it easier to do all those edits in one sequence, then nest that sequence in the master sequence, where you apply the Scale and Positioning effects. That will save the step of applying the scale and position effects to each edited track item.

  • How to upload an image in jsp page

    hi,
    I want to upload an image file with my jsp page, but i cannot do it,
    I have used Jakarta common file upload for this & i have also read following file. But my code isnot working properly? Can you give me any example how to upload an image & how to display it?
    Can u give me any source code? Please help me.
    http://jakarta.apache.org/commons/fileupload/using.htmlwith regards
    Bina

    Hi,
    But after writing the following code i have got following error? What's the problem of this code? please help me?
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    <%@ page import="org.apache.commons.fileupload.*" %>
    <%@ page import ="java.util.*" %>
    <%@ page import ="java.io.*" %>
    </head>
    <body>
    <%
    boolean isMultipart = FileUpload.isMultipartContent(request);
    DiskFileUpload upload = new DiskFileUpload();
    List items = upload.parseRequest(request);
    Iterator iter = items.iterator();
    while (iter.hasNext()) {
    FileItem item = (FileItem) iter.next();
    if (item.isFormField()) {
    String name = item.getFieldName();
    String value = item.getString();
    //ring name= request.getParameter("")
    %>
    <%= name %>:<%= value %>
    <%
    } else {
    %>
    <%
    InputStream stream = item.getInputStream();
    OutputStream bos =
         new FileOutputStream(getServletContext().getRealPath("/images"+"/"+ item.getName()));
    int bytesRead = 0;
    byte[] buffer = new byte[8192];
    while ((bytesRead = stream.read(buffer, 0, 8192)) != -1) {
    bos.write(buffer, 0, bytesRead);
    bos.close();
    stream.close();
    item.delete();
    %>
    </body>
    </html>Error is:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    FileUpload cannot be resolved
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    DiskFileUpload cannot be resolved to a type
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    DiskFileUpload cannot be resolved to a type
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    FileItem cannot be resolved to a type
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    FileItem cannot be resolved to a type
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    FileUpload cannot be resolved
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    DiskFileUpload cannot be resolved to a type
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    DiskFileUpload cannot be resolved to a type
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    FileItem cannot be resolved to a type
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    FileItem cannot be resolved to a type
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)Please help me.
    With regards
    Bina

  • HOW TO UPLOAD BACKGROUND IMAGES IN SMARTFORMS

    HI
    HOW TO UPLOAD BACKGROUND IMAGES IN SMARTFORMS

    Hi, 
       goto se78 -> in the menubar click graphic  and import to select ur images from ur system .. then click transport button .. it automatically gets into the smartform graphic image list.. then get into transaction smartform and use the image u imported into that..
    U can import anykind  of image which u have stored in ur pc through se78..
    Regards,
    Priya.

  • How to upload a image or flash file as blob object in a table.

    How to upload a image or flash file as blob object in a table.
    What are all the possible ways we can do it.

    Searching the forum (or google) would be my first choice, as this question pops up every now and then.
    Next without knowledge of your environment (jdev version and technology stack) it's hard to give a profound answer.
    All I can say is that it's possible.
    Timo

  • How to move multiple images in applet

    Hi,how to move multiple images in applet or random images in applet .
    Means moving images.gif around the applet with different starting point ,help me to create that move method ..

    why don't you check the tumbling duke applet as provided free in this site? :-)

  • How to Upload Mutilple Images in content repository?

    Hi
    How to Upload Mutilple Images in content repository?
    I have a html which shd be displayed and it has 3 images which shd be displayed
    in the same page
    Here i am able to display the HTML uploaded in content repository
    but the images are not displayed,since the path is not valid for the images.
    Can any one hint me in this,
    wating for the reply
    Thanks in Adv
    Regards
    Suresh

    Suresh, your html specifies an image at resources/images/privacy.gif - is that
    image in your repository at the correct relative position to where yout html is?
    Your html and repository structure must match. So if the html you posted is at
    /BEA Repository/foo.html
    then privacy.gif must be at /BEA Repository/resources/images/privacy.gif
    James
    "Suresh" <[email protected]> wrote:
    >
    >
    >
    Hi James
    Here i have attached my sample html and image
    My Repository Structure is as follows :
    Virtual Content Repository
    BEA Repository
    MainImage type image
    Privacy type i created
    ----StartDate
    ----EndDate
    ----File Upload
    My HTML
    <HTML>
    <HEAD>
    <TITLE> New Document </title>
    <META NAME="Generator" CONTENT="EditPlus">
    <META NAME="Author" CONTENT="">
    <META NAME="Keywords" CONTENT="">
    <META NAME="Description" CONTENT="">
    </head>
    <BODY>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td class="norBold"><img src="resources/images/privacy.gif"
    width="123"
    height="73">Privacy
    Policy</td>
    </tr>
    <tr>
    <td class="formHeadBack" height="19"><b> Privacy Policy</b></td>
    </tr>
    </body>
    </html>
    and
    one image
    Thanks in Adv
    Suresh
    "James Owen" <reply.to@newsgroup> wrote:
    Suresh, how is your content structured and what does your html looklike?
    If you
    could post examples, that would be helpful.
    thanks,
    James
    "suresh" <[email protected]> wrote:
    Hi
    How to Upload Mutilple Images in content repository?
    I have a html which shd be displayed and it has 3 images which shd
    be
    displayed
    in the same page
    Here i am able to display the HTML uploaded in content repository
    but the images are not displayed,since the path is not valid for the
    images.
    Can any one hint me in this,
    wating for the reply
    Thanks in Adv
    Regards
    Suresh

  • How to add multiple images in jinternalframe

    Hi all,
    how to add multiple images to the jinternalframe, at specified location of the pane and resizing the images with specified height and width.
    code examples are highly appreciated.
    Thanks & Regards,
    Abel

    Thanks, it works perfectly. It's a really smart way of fixing the problem too :)
    I also found your toggle button icon classes which is something I've also had a problem with.
    Thanks.

  • How to upload the image and diplay the image in the browser using jsp

    How to upload the image and diplay the image in the browser using jsp
    thanks
    shan

    i'll suggest looking for sample code or tutorial with a relevant query in google, which as far more time than us to answer this type of reccurent question

  • How to upload multiple files using wicket

    Hai,
    how to upload multiple files using wicket at a single browse.
    any suggestion?
    Thanks in advance

    You have to do this your self by either (as vinod said) using a different component (not present in adf) or implementing this:
    1) allow the user to select multiple filenames (somehow)
    2) zip them together
    3) upload the zip
    4) unpack the zip on the server
    5) work with the files
    Timo

  • How to upload multiple files in Webdynpro using File upload Screen Element

    Hi Experts,
          Can anybody tell me how to upload multiple files/pdfs in webdynpro using file upload screen element, and also please tell me what is the maximum storage limit of RAWSTRING data type,Advance Thanks.
    Regards,
    Sandesh

    Hi Sandesh,
    this is simply not supported, not in WebDynpro nor in standard HTML.
    A workaround is to upload a ZIP with all files and on server side unpack the ZIP and operate on the single files.
    I hope it will  help u..
    ----------------------OR-------------------------
    As you know using File upload UI element we can upload only one file at a time. There may be a scenario where user may want to upload any no of files at a time which is not determined at design time. This can be acheived using the ACF UpDownload UI element which requires a security whiltelist to be created
    http://scn.sap.com/docs/DOC-2270
    ----------------------OR-------------------------
    You can use Table UI element.
    Regards,
    Deepak Singh

Maybe you are looking for