Image upload / resize in "Update Record" form?

Hi
I've created a form to add products to a database, it includes an image field using the "upload and resize image" behavior. This works fine.
But now I'm building the uèpdate form and want to offer users the possibility of either retaining the current file, uploading a new image to the server (and delete/overwrite the previous one if it exists) or delete the current image without uploading a new one.
how would i go about this?
thanks.

Hi Waleed,
oops, yes, sorry, you´re right of course -- just didn´t read it too carefully :-)
However, what Somaboy and Dave want, is a little different from what the tutorial explains at this point -- what´s explained there, will of course be deleting that image physically and erasing the file name entry from the table, but that won´t cover the requirement to additionally upload another picture from the same form.
In this special case I *think* that one would have to perform both deletion processes as "before" triggers -- to make sure that the file as such plus the corresponding table entry are really gone before the upload procedure happens.
If someone will ever find out a well-working strategy to get this
(BTW very often asked for) requirement done, many folks here would certainly jump for joy -- also because that´s something you apparently can´t do without implementing a chain of at least custom triggers.
But there´s also a much easier solution available to those folks who don´t want to bother with implementing custom triggers for this purpose alone :: this is how I´d do it:
1. use what´s described in step 3 of the tutorial you posted to delete the physical file and the "filename" column entry
2. pass the current recordset´s ID to the "redirect after update" page, and here...
3. add a "SELECT file_column FROM table_name WHERE ID" matches the URL parameter ID - query in order to check if this column is empty or not -- and if it´s empty, execute an "upload and resize image" behavior on this page.
Cheers,
Günter Schenk
Adobe Community Expert, Dreamweaver

Similar Messages

  • Where is the update records form wizard in dreamweaver cc?

    Where is the update record form wizard in dreamweaver cc?
    Does anyone know of a website or a reference manual about dreamweaverCC?  every example and tutorial online are mostly about older versions of Dreamweaver.  Some brainiac at Adobe thought, why don't we change the whole freaking interface around so nobody can figure out where anything is anymore with the new version....&^$@^#$^^

    Simply choose Server Behaviours --> + --> Update Record

  • Update record form wizard

    I am having problems with inserting update record forms and
    Custom From from the wizards into php files i am using Dreamweaver
    cs3 and Developer Toolbox.
    An Insert form works OK.
    The Update Form inserts into the page and can be accessed
    from the server, bit on attempting to update database I get the
    following message:
    quote:
    Developer Details:
    tNG_update.prepareSQL:
    No Primary Key Column was set. (UPD_NO_PK_SET)
    quote:
    tNG Execution Trace - VIEW
    * tNG_update.executeTransaction
    o STARTER.Trigger_Default_Starter
    o tNG_update.doTransaction
    + BEFORE.Trigger_Default_saveData
    # tNG_update.saveData
    + BEFORE.Trigger_Default_FormValidation
    + tNG_update.prepareSQL*
    o tNG_update.getRecordset
    o tNG_update.getFakeRsArr
    o tNG_update.getLocalRecordset
    o tNG_update.getFakeRecordset
    /Q]
    When using the Custom form wizard (inset and update) and
    {else} statement is inserted into the code and only the 'insert'
    button appears when I require 'insert', 'update' and 'delete'.
    Has anyone else experienced this - is there something I am
    not doing?

    Hi Glenn, I kept having the same problem this morning. What I
    finally figured out is that I wasn't using the session variables
    properly. For example. My user_ID field maps to the session
    variable name kt_login_id
    my email field maps to kt_login_user (I use my email as user
    name) and password is kt_password. I finally printed out the
    Session information from login settings in the control panel so I
    was sure to fill out the data in the update wizard correctly.
    Open up the Update Transaction panel and under the Fields
    Tab, you can see how your table fields are mapped to the session
    fields. Hope it helps.l

  • Update record form

    Hello all,
    I've got an update record form on one of my pages (it is a
    php site). I followed the tutorial in dreamweaver 8, but it does
    not work like I want it to work.
    I am hoping that when a user logs into the site, and they
    want to update their information, they will be redirected to a page
    that has a form. This form has all the text fields blank, except
    for thier username (which is not editable). The rest of the fields,
    they can enter as many as they want. The fields that are left blank
    will have no effect on the record in the database.
    How it is now, I've got to have them retype in their username
    and password, then the form fields populate, but if they make a
    mistake and erase a field, then that field is deleted in the
    database.
    Is there a tutorial that I have not found yet that I can
    learn how to do this?
    Thank you

    Hi,
    If you dont want the Dreamweaver to update your dependent files, Just go to the "Edit -> Preferences" menu, In the preferences dialog click on the "Site" category which can be seen in the left panel, and there you might have some options for setting the "Dependent files" preferences, just check out the "Get/Check Out" and "Prompt on Put/Check" options.
    I hope this might fix your issue.
    HTH

  • Populate List/Menu in Update Record form

    I am creating an update record form that contains a list/menu
    (with values General, 2002, 2004, 2006)
    How do I populate this menu so that it pulls current value
    from database, and not just the top default value each time?

    Swn-Y-Mor wrote:
    > I am creating an update record form that contains a
    list/menu (with values
    > General, 2002, 2004, 2006)
    >
    > How do I populate this menu so that it pulls current
    value from database, and
    > not just the top default value each time?
    Select the menu object in the form. Then click the Dynamic
    button in the
    Property Inspector. In the dialog box that opens, click the
    lightning
    bolt next to Select value equal to. Finally, choose the data
    field from
    the correct recordset.
    David Powers
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "Foundation PHP 5 for Flash" (friends of ED)
    http://foundationphp.com/

  • ADDT multi image upload leads to Fake Record error???

    Rather than using a Wizard to create a multi image upload (which wasn't
    work!), I created an insert record page, and then created an "upload &
    resize image" file action on each of three fields:
    Thumb
    ItemImage
    LargeImage
    I designated these fields as file fields in the Insert Record setup, even
    though they are text fields because that allows a browse button to be added.
    I then added the Upload and Resize action on each of those fields and there
    is a place to store the image name in the fields for Thumb, Large, etc.
    It appears to be correct, but I got this error when trying to load the page:
    Error:
    Internal error.
    Developer Details:
    tNG_fields.getFakeRecordset:
    SQL error: Error creating temporary table:
    Table 'KT_fakeRS_20080918' already exists <<<<<<<<<<<<!!!!
    SQL:
    CREATE TEMPORARY TABLE KT_fakeRS_20080918 (LargeImage TEXT, ItemName TEXT,
    ItemShortDesc TEXT, ItemLongDesc TEXT, ItemCatID TEXT, LHJ_Number TEXT,
    ItemType TEXT, BrandName TEXT, ItemQuantity TEXT, Price TEXT, ItemThumb
    TEXT, ItemImage TEXT, catID TEXT) (FIELDS_FAKE_RS_ERROR)
    tNG Execution Trace - VIEW
    tNG_insert.executeTransaction
    STARTER.Trigger_Default_Starter
    tNG_insert.getRecordset
    tNG_insert.getLocalRecordset
    tNG_insert.getFakeRecordset*
    Why does this table exist? Is there some duplication in the ADDT code when
    adding Upload actions to an existing Insert Record set?
    Jeff
    Jeff
    ~~~~~~~~~~~~
    Jefferis Peterson, Pres.
    Web Design and Marketing
    http://www.PetersonSales.com

    On 9/19/08 7:05 PM, in article C4F94626.7F2EF%[email protected],<br />"Jefferis Peterson" <[email protected]> wrote:<br /><br />> <br />> Okay, I'm having a problem here. ItemThumb is a text field that stores the<br />> name of the gif or jpg file.<br />> <br />> I have 3 upload file fields  (large, medium, thumb) which are supposed to<br />> store their values (file names??) in the text fields, and I have set  the<br />> ItemThumb to receive its value on insert from the file field.<br />> There seems to be a duplication of field insertion requirements here, so I'm<br />> not sure what to make of the problem, but if I remove the text fields from<br />> the insert transaction, there is no option to store their names in those<br />> fields in the file upload dialog box....<br />> <br />> What is odd is that I'm not getting that error on the medium image text file<br />> even thought it is setup exactly the same as the thumb text...<br />> Jeff <br />> <br />> ~~~~~~~~~~~~<br /><br />After checking the database online, it is adding the information to all the<br />file fields but it is not uploading the images to the directories... Not<br />sure what the reason for the error is...<br />~~~~~~~~~~~~<br />Jefferis Peterson, Pres.<br />Web Design and Marketing<br />http://www.PetersonSales.com

  • Multiple Image Upload Wizard Not Creating A Form

    I'm working on a new site and I keep running the multiple image upload wizard.
    It connects to the database fine, gets the primary key and all that. It sees the two columns that should be included in the form field in addition to the image_url field.
    When I hit finish on the wizard all the proper code seems to be created except the form. The upload button is the only user interface element created.
    Anybody got ideas on what is causing this? I've used this wizard on other projects sucessfuly, but I can't figure out what I'm doing differently here.
    thanks,
    - Tanner

    I believe you have to create the form first with some File Upload fields then run the Wizard.
    Cheryl

  • Update Record Form Wizard Not Working

    This is my first attempt at creating dynamic pages via asp and microsoft access. However I think I've done pretty well for my first go around. Any help would be so greatly appreciated as I've only got 5 hours of sleep in the last 2 days.
    I'll try to explain what I did and what's happening. For anyone that may be interested in helping me out, here are the test account login credentials:
    username: username
    password: password
    My property update will not post to the database. Upon clicking update record I get a 500 Internal Server Error. To see an example of whats happening login by going to http://www.rentalpaypro.com/members/index.asp.
    Then click on the link "Update Monthly Rent and Delete Properties", click on a Property ID and then click update record.
    This is where the error appears and I can not for the life of me figure out what I've done wrong. I'M BEGGING, CAN SOMEONE PLEASE HELP ME OUT?
    Thanks,
    Ken

    Hi Ken,
    when looking at the source code of propertyupdate.asp I see that the whole form has been placed outside the document´s body, more precisely preceeding the DOCTYPE declaration.
    No clue if this causes your issue, but fixing this is certainly worthwile anyway :-)
    However, I also noticed that it´s a manually created form and not done with ADDT, and it´s been assembled using Dreamweaver´s native server behaviours (evidence: the MM_update and MM_recordId hidden fields) -- that said, I think you´d better ask this question in the regular DW application development forums.
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Update record form wizard problems

    I have an update form right after my log in page, but I guess my id is not getting carried to it. So everytime a user tries to update his record it says "No Primary Key Column was set"
    I used the update form wizard to create the update form and the log in form wizard for logging in. I checked the URL parameter and selected the right field in Primary Key Column in the update form wizard. You can actually update the record if you select "entered value" in Primary Key Equals and put a number against it, but not otherwise.
    Am i missing something. Im a complete novice so any advice is appreciated.

    I see this problem posted in lots of places - hopefully this will help someone...
    I had put the form on the page myself and filled in the filename in the "action" setting for the form.
    If the wizard creates the form, it uses...
    for the action value which maintains the get parameters that you passed from the other page. The "setPrimaryKey" function then has both that GET value (so it doesn't lose track of which record it's working on) and the POST information coming in from the form.
    I couldn't understand how my page had the primary key information the first time in but not when I submitted the form... this was the reason. It never affected the insert part of things because that doesn't rely on an existing primary key.

  • Image upload & resize

    case "image/pjpeg": //IE's weird jpeg MIME type

    On 9/19/08 7:05 PM, in article C4F94626.7F2EF%[email protected],<br />"Jefferis Peterson" <[email protected]> wrote:<br /><br />> <br />> Okay, I'm having a problem here. ItemThumb is a text field that stores the<br />> name of the gif or jpg file.<br />> <br />> I have 3 upload file fields  (large, medium, thumb) which are supposed to<br />> store their values (file names??) in the text fields, and I have set  the<br />> ItemThumb to receive its value on insert from the file field.<br />> There seems to be a duplication of field insertion requirements here, so I'm<br />> not sure what to make of the problem, but if I remove the text fields from<br />> the insert transaction, there is no option to store their names in those<br />> fields in the file upload dialog box....<br />> <br />> What is odd is that I'm not getting that error on the medium image text file<br />> even thought it is setup exactly the same as the thumb text...<br />> Jeff <br />> <br />> ~~~~~~~~~~~~<br /><br />After checking the database online, it is adding the information to all the<br />file fields but it is not uploading the images to the directories... Not<br />sure what the reason for the error is...<br />~~~~~~~~~~~~<br />Jefferis Peterson, Pres.<br />Web Design and Marketing<br />http://www.PetersonSales.com

  • Dynamic Image Upload, Resizing Help

    Basically here is what I need to do:
    For a website backstage I need an admin to be able to upload
    a pic of unknown width and height and resize it for 2 standard
    widths, one for thumbnail and one for a larger pic. If there is a
    good open source package out there or a good way to do it I'm open
    to suggestions. Thanks!

    Here are a couple of items that could help.
    ImageCFC
    http://imagecfc.riaforge.org/
    TMT_Img
    http://www.olimpo.ch/tmt/cfc/tmt_img/
    Bryan Ashcraft (remove brain to reply)
    Web Application Developer
    Wright Medical Technology, Inc.
    Macromedia Certified Dreamweaver Developer
    Adobe Community Expert (DW) ::
    http://www.adobe.com/communities/experts/
    "binxsta" <[email protected]> wrote in
    message
    news:esk8ut$994$[email protected]..
    > Basically here is what I need to do:
    > For a website backstage I need an admin to be able to
    upload a pic of
    > unknown
    > width and height and resize it for 2 standard widths,
    one for thumbnail
    > and one
    > for a larger pic. If there is a good open source package
    out there or a
    > good
    > way to do it I'm open to suggestions. Thanks!
    >

  • Can you move a 'Multiple Image Upload' button  into the 'Update Form'?

    I am able to creat and an Update form and an image upload using the "Update Form Wizard" tool and the "Multiple Image Upload" tool succesfully.
    <br />
    <br />The problem comes when I try to move the "UPLOAD" button inside the Update form. Right now it looks like this:
    <br />http://www.webritesolutions.com/Test/upload/now.JPG
    <br />
    <br />This is how I would like it to show:
    <br />http://www.webritesolutions.com/Test/upload/tryingto.JPG
    <br />
    <br />I want to "Upload" button to go next to the "Update record" button. When I do this I get a javascript error and the "Update record" button is disabled.
    <br />Here is the code of what I tried to do:
    <br />
    <br />
    <br />
    <br />
    <br />
    <table>
    <tr class="KT_buttons">
    <td>
    <?php<br />        // Multiple Upload Helper<br /> echo $muploadHelper->Execute();<br /> ?>
    </td>
    <td colspan="1">
    <input type="submit" name="KT_Update1" id="KT_Update1" value="Update record" />
    <br /></td>
    </tr>
    </table>
    <br />
    <br />Here is the Javascript error:
    <br />http://www.webritesolutions.com/Test/upload/error.JPG
    <br />
    <br />thanks for your help.

    A control can only appear once in the visual tree. So you have to remove it from the Grid before you can add it to the DockPanel.
    This code will move the Border element from the Grid to the DockPanel when you click the button:
    Private Sub Button_Click(sender As Object, e As RoutedEventArgs)
    Dim border = CType(LayoutRoot.FindName("myborder"), Border)
    LayoutRoot.Children.Remove(border)
    contain.Children.Add(border)
    End Sub
    <StackPanel>
    <Grid x:Name="LayoutRoot">
    <Border x:Name="myborder" BorderBrush="Black" BorderThickness="2">
    <TextBlock>...</TextBlock>
    </Border>
    </Grid>
    <DockPanel x:Name="contain" Background="Yellow">
    <TextBlock>2</TextBlock>
    </DockPanel>
    <Button Click="Button_Click" Content="Move"/>
    </StackPanel>
    You can try it for yourself. But please post your code as formatted text and not as embedded images if you want anyone to be able to reproduce your issue and help you in the future.
    Please remember to close your threads by marking helpful posts as answer.

  • ADDT multiple image upload: "error 500"

    Right now, I have managed to get the update record form wizard working, the right input ends up in the correct fields in the database.
    So I'm left fighting with the "multiple image upload", which gives me an "error 500" message (error connecting to server)
    The window does show me the correct files in the correct folder, but when I try and upload an image I always get the error 500 message.
    I have read that the "multiple file upload" uses a temporary folder, and Im assuming that the "multiple image upload" does the same, and I suppose that I should CHMOD that folder to 777.
    Do you know where I can find that folder?
    Can anyone help me with that error?
    Please?
    Sorry about my name, I tried a lot of other names, and all were taken, but this random name went just fine

    I thought it did - When I used the upload and save to database it saved the original images in a folder and created a sub folder called "thumbnails" and saved the thumbnails - origianl filesname just with width and height appended at the end.
    I checked my server files and their definately created.
    I browsed the java script and the help files which mentions it does this but I would like to be able to change the naming format of the thumbanils if possible

  • Problem with update record, then link to file

    Environment:
    Dreamweaver 8, MySQL, PHP.
    I have a repeating record from my database. I added an Update
    Record server behavior for each search result for the result table.
    I added a button to the form and changed "submit" to "view".
    Pressing "view" is supposed to allow the user to view the detailed
    record information.
    The Update Record server behavior is supposed to do two
    things:
    1) add 1 to the 'numViews' filed of the record's database
    entry when the "view" button is pressed
    2) After updating the numViews field, the form is supposed to
    redirect the user to the detailed record
    I found that depending on how I create the record, I an do
    one of the above 2 behaviors, but not both. HELP!
    To add 1 to the numViews field, I created a form variable
    called incNumViews, which does the following:
    <?php echo $row_rsSearchResults['recipeNumViews']+1; ?>
    Very simple.
    The Update Record ends up changing the form action to the
    following:
    <?php echo $editFormAction; ?>
    Looking at the code for this, I ee the following:
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
    $editFormAction .= "?" .
    htmlentities($_SERVER['QUERY_STRING']);
    But when the "view" (ie: submit" button for the form is
    pressed, I get redirected back to the same repeating record search
    result page, not to the record detail page.
    However, the numViews field in the record is getting properly
    incremented.
    I tried to get around this by changing the Update Record
    behavior "After updating, go to:" field to point to the record
    detail page, and tried passing a parameter tot he recordID I want
    to see details of, as a URL parameter, but that does not work.
    If I change the Update Record form action from
    <?php echo $editFormAction; ?>
    to
    record_detail.php?recordID=<?php echo
    $row_rsSearchResults['recordID']; ?>
    Then I am able to link to the detail page, but NOT update the
    numViews field.
    HOW can I fix this to both update the record, then jump to
    the detail page with a URL parameter being passed, when I click the
    "view" (submit) button o the form??
    Thanks in advance.

    If the user's computer doesn't know what to do with a TIFF file, I guess that Open button would be missing.  Tiff is not a web normal file format, or even a common one for graphics applications....

  • Image Upload and Resize Trigger Order Question

    Hello All,
    I do enjoy and like using the ADDT, however I do have a problem with the Image Upload and Resize trigger.
    I understand that this trigger is of the AFTER type, and as such, the insert record I have on the page is implemented first and the data is inserted into the table, then images uploaded provided they are smaller than 200 kB in size.
    However, as I have a field that is unique in the database, if the upload fails I am unable to upload any files which are under the size and put that information into the database, as there is already a record with the unique value.
    Is there an easy way to work around this by trying to capture the error before the data is inserted into the database?
    An idea I have is to: check the unique field with the value to be inserted, if fails, change unique value -> nothing inserted yet, no files uploaded.
    If the unique check passes, insert remaining data and trigger the upload and resize image trigger, once that is complete, have an update of the table to update with the unique value.
    I can see the above working, (I think), but I just have to write the code to implement the idea.
    I am not sure how to use the roll-back triggers either, if the Upload Image trigger fails, to remove the inserted record.  But if I can manage the roll-back trigger to remove the record, that is an option to consider for what I want to achieve.
    Thanks to any help people can provide.
    Cheers,
    Ian.

    Thank you for your reply.
    I have a work-around, I have split the forms over two pages, rather than put everything on one page - which introduced another issue, to which I have made a work-around of sorts too.
    The two forms, on different pages, is probably a better idea in terms of better management of data input. The work-around was a Header redirect based on a form variable, as, if I used a Custom Trigger to dynamically generate a new URL, it generated an escaped-encoded URL - to which I have not figured out how to fix.
    So, in the meantime, it works, so I will settle for that at the moment.
    Again, thanks for you reply.
    Ian.

Maybe you are looking for

  • How do I keep duplicate messages in Mail and Gmail?

    For the past few years messages would appear in both my Mail and Gmail inboxes.  If I deleted a message in Gmail, the duplicate would REMAIN in Mail. Therefore, I could keep some messages in my gmail account that pertained to work and delete their du

  • Not able to send file Using FTP in SSIS 2005

    I am using SSIS 2005 I am trying to send file to ftp server using FTP task in SSIS but i am getting following error. Error Message-:An error occurred in the requested FTP operation. Detailed Description-:550 /FileName.txt: Access is denied. Remotefil

  • Ipod classic features

    i dont have one of these yet, but im going to probably get one from my grandma for christmas, and i was wondering, does the new ipod classic 80GB have a visualizer like itunes?

  • Best Practices to implement Login Attempts Failed.

    I would like to implement the disable the user account after a certain number of invalid login, What is the best way and secure way to implement this? i do some research, some recommended to create a temporary table in database and keep track the num

  • Changing between process version 2012 to 2010 in LR4

    I know that the sharpening and noise reduction was improved for the 2010 process version.  Were they improved more for the 2012 version?  I would love to swich back to 2010 but I just want to make sure I don't loose the better quality of the sharpeni