Skip to main content
Participant
October 3, 2006
Question

Preview images before upload?

  • October 3, 2006
  • 2 replies
  • 454 views
I have a website where I allow users to upload details on their products as well as up to 3 images. I'd like to create a review page where the user can review the details they added, and the images they're going to upload BEFORE I submit them to the database. Is there any way I can allow a user to preview the image before it's inserted into the DB?

Thanks
Rick
    This topic has been closed for replies.

    2 replies

    October 3, 2006
    Inspiring
    October 3, 2006
    with just cfml, you will have to use <cffile> to upload user's images to a directory of your choice, then you can display the images in the preview page. if all is good and no changes needed, then you can insert the images (bad idea) or reference to images' location/name (good idea) into your db (and use cffile to move the images to final location if uploaded to a temp location first). if users decides to change an image while in the preview page, use <cffile> again to delete the uploaded image being changed.
    through all this you will need to keep record of uploaded filenames, through session vars or whichever way you like to do it.