PHP image upload

Hi, sorry for posting this here but I'm having a hard time
finding an answer via search engines. Maybe I just don't know what
criteria to search for. Here's what I'm trying to accomplish:
Form (Flash or HTML) that enables a user to choose an image
file, upload it and have a PHP script append the image file name to
an existing XML file for use in my .swf
I am just getting involved in PHP and find it very useful but
I am having the worst time searching for help! This forum is the
greatest and I hope someone here knows a link or something to point
me to.
Many thanks...

thanks for googling. You know I did google and found something similar and did try to add the init to my php file but it really did not work. I was up to 80m which seems a bit much when trying to load a single 480kb file. This is why I posted here in the mac discussions.
I normally trust the information that I get here and not necessarily from google results.

Similar Messages

  • PHP image upload to SERVER

    Hi, I had create a upload picture into the server.It is able
    to work on the WAMP server and upload successfully. However, I
    faced some error when I upload into the server.
    Warning: copy(): open_basedir restriction in effect.
    File(/images/uploaded/1221651842.jpg) is not within the allowed
    path(s):
    (/var/www/vhosts/sppa.org.sg/subdomains/istaff/httpdocs:/tmp) in
    /var/www/vhosts/sppa.org.sg/subdomains/istaff/httpdocs/editImage.php
    on line 138
    Warning: copy(/images/uploaded/1221651842.jpg): failed to
    open stream: Operation not permitted in
    /var/www/vhosts/sppa.org.sg/subdomains/istaff/httpdocs/editImage.php
    on line 138
    Can anybody please help?
    Thanks a million!

    Hi, I had create a upload picture into the server.It is able
    to work on the WAMP server and upload successfully. However, I
    faced some error when I upload into the server.
    Warning: copy(): open_basedir restriction in effect.
    File(/images/uploaded/1221651842.jpg) is not within the allowed
    path(s):
    (/var/www/vhosts/sppa.org.sg/subdomains/istaff/httpdocs:/tmp) in
    /var/www/vhosts/sppa.org.sg/subdomains/istaff/httpdocs/editImage.php
    on line 138
    Warning: copy(/images/uploaded/1221651842.jpg): failed to
    open stream: Operation not permitted in
    /var/www/vhosts/sppa.org.sg/subdomains/istaff/httpdocs/editImage.php
    on line 138
    Can anybody please help?
    Thanks a million!

  • Fatal error on php image upload

    I'm trying to test a popular CMS system on my mac and I'm getting the following error when trying to upload a single image.
    Fatal error: Allowed memory size of 10485760 bytes exhausted (tried to allocate 7776 bytes) in /Library/WebServer/Documents/FlashModX/assets/snippets/maxigallery/watermark/Th umbnail.class.php on line 183
    My php.ini settings are:
    memory 128
    post max size 8
    upload max filesize 2m
    max execution time 30
    max input time -1
    what do I need to change?

    thanks for googling. You know I did google and found something similar and did try to add the init to my php file but it really did not work. I was up to 80m which seems a bit much when trying to load a single 480kb file. This is why I posted here in the mac discussions.
    I normally trust the information that I get here and not necessarily from google results.

  • PHP image gallery uploader for client website?

    I am trying to find a php image gallery uploader so that once I install the code into my clients website, they can upload via the web their pictures to the gallery, I've googled and come up empty. It would need to look nice, not clunky (think flowchart gallery on the mac).
    How can this be done. Hoping to buy software and install it, let the program do the work.
    Thanks,
    Stefan
    http://www.bluebarngraphics.com

    I am not aware of any off the shelf software  as you describe, but I am thinking is should be a fairly straightforward project.
    1. Create a form for your client to upload images, alt  and text descriptions into a database.
    2. Take some off the shelf photo gallery, wrap the code in a "do while" loop, call the images and text from the database.
    Gary

  • Multiple Image Uploading Question

    Please forgive my ignorance here but I saw the question on multiple image uploading and this is something i have been trying to do for a few days now without any success.
    I am using CS3 with ADDT and PHP
    I want to allow my users to be able to upload say 5 pictures at a time, each user has multiple photo albums the names of which are stored in mysql table, the image name is stored in a different table with a reference to the album id.
    So, I assume that i put an insert record on the page, I followed the usual process used to have a single image upload and thought it would give me or add the extra file field options on the form when telling the multi upload to allow 5 images to be uploaded, not the case. Do i have to create a form on the page first with 5 file fields or am i just missing the plot here.
    Sorry if this is just something that seems simple but i just don't seem to be able to get it to work at all. I have no working example to look over and have serach google to see if there are any tutorials for doing this but can't find any at all.
    Thank you in advance of any help and guidance given
    Regards
    Ray

    Hi Günter
    Thank you for your reply and also for the great tutorial site you run which has helped me quite a lot with several things.
    ok, so i am maybe a little confused here, so what is the multiple image uploader for if not for uploading multiple images, and how does it give you the option to select more than one file or is it that you can't use it when inserting the image file into a database?
    Please forgive my ignornace again, i can see when i have tried using the multiple image upload thatit puts a text link called upload, what is that for because it doesn't seem to do anything on the page i have tried it on?
    Kind Regards
    Ray

  • 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.

  • Multiple image upload CRASH!!! but works with simple image upload

    I'm getting MAD.
    I'm using php and GD
    While the simple image and re size works like a charm, the multiple image upload or the multiple file upload have a strange behavior.
    It opens the pop-up with flash, then eventually shows me files or thumbnails but when I try to up load I just wait and get the typical "system becoming unstable" flash error.
    As I can see the directory is always generated (I've tried also to put a static directory) but after stargin the upload the flash uploader just crashes and no result.
    Any help would be really appreciated

    Hi Fonzie,
    as the folder is getting created, the issue you´re having is not related to wrong folder permission - it´s something else...
    As I wrote before, che common upload and resize function works perfectly
    this one works perfectly, because it´s just one file to upload and to process, wheras doing that with multiple files might collide with some settings on your server
    So for sure it's not a simple issue as the max filesize
    Are you sure ? Did you check the current "max_upload_filesize" setting ? As long you don´t check it, you can´t know :-)
    As a general rule of thumb, it´s important to be aware of the fact that uploading & resizing images on the server might collide with several PHP settings -- and the more images you upload and resize in one swoop, the closer you´re getting to these limits respectively might even be exceeding them. The following "directives" are those which have an effect on whether your image/file upload & processing will work or not:
    - "max_upload_filesize" :: is sometimes set to just 8 MB on a shared hosting, sometimes 16 MB, sometimes more. This setting will affect the file upload procedure only
    - "set_time_limit" (e.g. 30 seconds) :: if the execution time of a script exceeds this limit for whatever reason, the server simply shuts it down without letting you (respectively the flash uploader) know it´s been shut down. This *might* be the reason why ADDT´s flash uploader hangs respectively returns that error message after some time, because it´s waiting for some response from the server which never comes.
    - "memory_limit" (e.g. 8 MB) :: this directive is a sort of "allocated server RAM" for your account, and it´s in particular the image resizing process which will grab more or less memory resources -- the higher the the resizing factor is, the more RAM is spent, and the more images are getting resized in one swoop, the worser it gets.
    However, all these PHP directives can be changed, and your host might even be so courteous to increase the currently defined values of those abovementioned directives for you -- and that´s what I´m suggesting at this point.
    Cheers
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Image upload not working

    I have an image upload script that upload the image, but does not allow the name of the image to be inserted into the database.
    Here is the code
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "signup3")) {
      $updateSQL = sprintf("UPDATE player SET photo=%s WHERE player_id=%s",
                           GetSQLValueString($_FILES['ufile']['name'], "text"),
                           GetSQLValueString($_POST['user'], "int"));
      mysql_select_db($database_db, $db);
      $Result1 = mysql_query($updateSQL, $db) or die(mysql_error());
      $updateGoTo = "team-control.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $updateGoTo));
    //define a maxim size for the uploaded images in Kb
    define ("MAX_SIZE","50000");
    //This function reads the extension of the file. It is used to determine if the file  is an image by checking the extension.
    function getExtension($str) {
             $i = strrpos($str,".");
             if (!$i) { return ""; }
             $l = strlen($str) - $i;
             $ext = substr($str,$i+1,$l);
             return $ext;
    //This variable is used as a flag. The value is initialized with 0 (meaning no error  found) 
    //and it will be changed to 1 if an errro occures. 
    //If the error occures the file will not be uploaded.
    $errors=0;
    //checks if the form has been submitted
    if(isset($_POST['Submit']))
         //reads the name of the file the user submitted for uploading
         $image=$_FILES['ufile']['name'];
         //if it is not empty
         if ($image)
         //get the original name of the file from the clients machine
             $filename = stripslashes($_FILES['ufile']['name']);
         //get the extension of the file in a lower case format
              $extension = getExtension($filename);
             $extension = strtolower($extension);
         //if it is not a known extension, we will suppose it is an error and will not  upload the file, 
        //otherwise we will do more tests
    if (($extension != "jpg") && ($extension != "jpeg") && ($extension != "png") && ($extension != "gif"))
            //print error message
                 echo '<h1>Unknown extension!</h1>';
                 $errors=1;
             else
    //get the size of the image in bytes
    //$_FILES['image']['tmp_name'] is the temporary filename of the file
    //in which the uploaded file was stored on the server
    $size=filesize($_FILES['ufile']['tmp_name']);
    //compare the size with the maxim size we defined and print error if bigger
    if ($size > MAX_SIZE*1024)
        echo '<h1>You have exceeded the size limit!</h1>';
        $errors=1;
    //we will give an unique name, for example the time in unix time format
    //$image_name=time().'.'.$extension;
    //the new name will be containing the full path where will be stored (images folder)
    $newname=$image;
    //we verify if the image has been uploaded, and print error instead
    $copied = copy($_FILES['ufile']['tmp_name'], $newname);
    if (!$copied)
        echo '<h1>Copy unsuccessfull!</h1>';
        $errors=1;
    //If no errors registred, print the success message
    if(isset($_POST['Submit']) && !$errors)
         echo "<h1>File Uploaded Successfully!</h1>";
    I dont know why its not working...I've used this same script in the same way in another website and it works fine.

    Check with your host for permission settings. If it works locally, and on other servers, then the code works, it just may not work in the particular
    environment your host has set up.
    Lawrence Carmer - *Adobe Community Professional*
    http://www.Cartweaver.com
    Complete Shopping Cart Application for
    Dreamweaver, available in PHP and ColdFusion
    Stay updated - http://blog.cartweaver.com

  • Restrict image pixel size in multiple image upload

    Re: Multiple Image Upload behaviour.
    One of the only issues I have with this extension is if users try to upload an image within the limits I set (of 250Kb) but with a high pixel count.
    For example, a jpg of 800 x 600 at 200Kb causes no problem, but a one of 2000 pixels at 150Kb probably will.
    I understand that there is probably more server load to resize a large pixel image, so is there a way to check the pixel size of images to be uploaded as well as the file size and reject it if it is too large?

    But what you could do, is retrieving the php.ini´s "post_max_size" value and display a note to your site visitors:
    <br />
    <br />
    <b>1.</b> put this into the doc´s head:
    <br />
    <br /><?php<br />$replace_max_size_MB = str_replace("M"," MB",ini_get('post_max_size'));<br />?>
    <br />
    <br />
    <b>2.</b> the related message:
    <br />
    <br />Pics larger than <?php echo $replace_max_size_MB; ?> will be rejected by the server
    <br />
    <br />Cheers,
    <br />Günter Schenk
    <br />Adobe Community Expert, Dreamweaver

  • Image upload bombs

    I'm working through a book right now on PHP, MySQL, and Web
    Dev. For the most part I've been doing fine, but when I was
    creating an image upload form today, it's giving me some errors.
    Here's the url:
    http://lwrussell.com/phptesting/chapt7/upload_image.htm
    Here's my form:
    <html>
    <head>
    <title>Upload your pic to our site!</title>
    </head>
    <body>
    <form name="form1" method="post" action="check_image.php"
    enctype="multipart/form-data">
    <table border="0" cellpadding="5">
    <tr>
    <td>Image Title or Caption<br>
    <em>Example: You talkin' to me?</em></td>
    <td><input name="image_caption" type="text"
    id="item_caption" size="55"
    maxlength="255"></td>
    </tr>
    <tr>
    <td>Your Username</td>
    <td><input name="image_username" type="text"
    id="image_username" size="15"
    maxlength="255"></td>
    </tr>
    <td>Upload Image:</td>
    <td><input name="image_filename" type="file"
    id="image_filename"></td>
    </tr>
    </table>
    <br>
    <em>Acceptable image formats include: GIF, JPG/JPEG,
    and PNG.</em>
    <p align="center"><input type="submit" name="Submit"
    value="Submit">
    <input type="reset" name="Submit2" value="Clear Form">
    </p>
    </form>
    </body>
    </html>
    Here's my php code:
    <?php
    //connect to the database
    $link = mysql_connect("hostomitted", "usernameomitted",
    "passwordomitted")
    or die("Could not connect: " . mysql_error());
    mysql_select_db('moviesite', $link)
    or die(mysql_error());
    //make variables available
    $image_caption = $_POST['image_caption'];
    $image_username = $_POST['image_username'];
    $image_tempname = $_FILES['image_filename']['name'];
    $today = date("Y-m-d");
    //upload image and check for image type
    //make sure to change your path to match your images
    directory
    $ImageDir ="
    http://lwrussell.com/phptesting/chapt7/images/";
    $ImageName = $ImageDir . $image_tempname;
    if (move_uploaded_file($_FILES['image_filename']['tmp_name'],
    $ImageName)) {
    //get info about the image being uploaded
    list($width, $height, $type, $attr) =
    getimagesize($ImageName);
    switch ($type) {
    case 1:
    $ext = ".gif";
    break;
    case 2:
    $ext = ".jpg";
    break;
    case 3:
    $ext = ".png";
    break;
    default:
    echo "Sorry, but the file you uploaded was not a GIF, JPG,
    or " .
    "PNG file.<br>";
    echo "Please hit your browser's 'back' button and try
    again.";
    //insert info into image table
    $insert = "INSERT INTO images
    (image_caption, image_username, image_date)
    VALUES
    ('$image_caption', '$image_username', '$today')";
    $insertresults = mysql_query($insert)
    or die(mysql_error());
    $lastpicid = mysql_insert_id();
    $newfilename = $ImageDir . $lastpicid . $ext;
    rename($ImageName, $newfilename);
    ?>
    <html>
    <head>
    <title>Here is your pic!</title>
    </head>
    <body>
    <h1>So how does it feel to be
    famous?</h1><br><br>
    <p>Here is the picture you just uploaded to our
    servers:</p>
    <img src="images/<?php echo $lastpicid . $ext; ?>"
    align="left">
    <strong><?php echo $image_name;
    ?></strong><br>
    This image is a <?php echo $ext; ?> image.<br>
    It is <?php echo $width; ?> pixels wide
    and <?php echo $height; ?> pixels high.<br>
    It was uploaded on <?php echo $today; ?>.
    </body>
    </html>
    Thanks guys! I appreciate it.
    -Luke

    Never mind, I figured it out. The $ImageDir needed so simply
    be "images/"

  • Custom Thumbnail Size(px) w/ADDT Multiple Image Uploader

    The standard thumbnail size that the Multiple Image Uploader generates is 150px x 100px
    I would like to know if there is any way to change that to 350 x 300?
    I am refering to the thumbnail that is generated and put into the
    thumbnails folder, not the thumbnail for the uploader itself :)
    Thank You!

    Hi Jason,
    this particular thumbnail size appears to be defined in the file "includes/tng/triggers/tNG_MImageUpload.class.php" -- here´s a function named "tNG_MImageUpload" with the following line:
    $this->showThumbnail(150,100,true);
    Guess you´ll have to change the thumbnail width-X-height values in here.
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • This is my Jsp code for image upload in database:

    This is my Jsp code for image upload in database:
    -----------Upload.jsp----------------
    <html>
    <head>
    </head>
    <body bgproperties="fixed" bgcolor="#CCFFFF">
    <form method="POST" action="UploadPicture.jsp" enctype="multiform/form-data">
    <%! int update=0; %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="java.text.*" %>
    <%@ page import="java.sql.Date" %>
    <%@ page import="java.io.*"%>
    <%@ page language = "java" %>
    <%
    try
    String ct="3";
    String path;
    File image=new File(request.getParameter("upload"));
    path=request.getParameter("upload");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:itPlusElectronics","","");
    PreparedStatement pstmt=con.prepareStatement("insert into graphics values(?,?,?)");
    pstmt.setString(2,path);
    pstmt.setString(3,ct);
    InputStream is=new FileInputStream(path);
    pstmt.setBinaryStream(1, is, (int)(image.length()));
    int s=pstmt.executeUpdate();
    if(s>0)
    out.println("Uploaded");
    else
    %>
    unsucessfull
    <%}
    is.close();
    pstmt.close();
    catch(Exception e)
    }%>
    </p>
    <p><br>
    <img src="UploadedPicture.jsp">image</img>
    <p></p>
    </form>
    </body>
    </html>
    My database name is itPlusElectronics and the table name is "graphics".
    I have seen as a result of the above code that the image is stored in database as "Long binary data". and database table is look like as follows-------
    picture path id
    Long binary data D:\AMRIT\1-1-Picture.jpg 3
    To retrive and display i use this JSP code as--
    ------------------------UploadedPicture.jsp------------------------------
    <html>
    <head>
    </head>
    <body bgproperties="fixed" bgcolor="#CCFFFF">
    <%! int update=0; %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="java.text.*" %>
    <%@ page import="java.io.*"%>
    <%@ page language = "java" %>
    <%@page import="javax.servlet.ServletOutputStream"%>
    <%
    try
    String path;
    path=request.getParameter("upload1");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:itPlusElectronics","","");
    PreparedStatement pst = con.prepareStatement("SELECT * FROM graphics WHERE id ='3'");
    // pst.setString(3, id);
    ResultSet rs = pst.executeQuery();
    path=rs.getString("path");
    if(rs.next()) {
    byte[] bytearray = new byte[4096];
    int size=0;
    InputStream sImage;
    sImage = rs.getBinaryStream(1);
    response.reset();
    response.setContentType("image/jpeg");
    response.addHeader("Content-Disposition","filename=path");
    while((size=sImage.read(bytearray))!= -1 )
    response.getOutputStream().write(bytearray,0,size) ;
    response.flushBuffer();
    sImage.close();
    rs.close();
    catch(Exception e)
    %>
    </body>
    </html>
    Now after browsing a jpg image file from client side and pressing submit button ;
    I am unable display the image in the Upload.jsp file.Though I use
    <img src="UploadedPicture.jsp">image</img> HTML code in Upload.jsp
    file .
    Now I am unable to find out the mistakes which is needed for displaying the picture in the Upload.jsp page..
    If any one can help with the proper jsp code to retrive and display the image ,please please help me !!!!!!!!!!!!!!!!!!!!!!!!!!

    dketcham wrote:
    cotton.m wrote:
    >
    2) I'm looking at how you called stuff, and you're trying to call the jsp file as an image? That jsp isn't the source of the image, just a page linking to an image. I think if you really want to do things that way you're going to need to just include that jsp within the jsp you're calling it from (or you can do it the easy way, and if you have the information to get the path of the image you want, you could simply call the image from the first jsp you posted)This is incorrect.
    There are two JSPs. The second when called will (if it worked) return the source of an image as stored in the database.even when called with <img src=xx.jsp>??
    Yes.
    If any of what I say next seems obvious or otherwise negative I apologize, just trying to explain and I don't know what you know vs what you don't.
    The link in the src is just a URL not a filetype. So just because it ends with JSP does not mean it has to return HTML. The content type is determined by the browser using the Content-Type header returned by the server in the HTTP response. In this case the header is set to be a jpeg so that's what the browser will attempt to interpret the content part of the response as.
    So in fact one is not limited to just HTML or images but whatever content type you would like to return (that the browser can understand anyway). This could be HTML or it could be an image of some type or it could be a PDF or it could be an Excel spreadsheet. All you have to do in the JSP is set the header appropriately and then send content that is actually in that format.
    This does not just apply to JSP by the way but all other web programming languages. You can do similar things to produce the same results in PHP, Perl, ASP etc.
    The only JSP/Servlet complication is whether or not doing this in a JSP is a "good" idea but I am not an expert enough at that to make a definitive statement. Mostly though JDBC in a JSP is a no-no.

  • Image upload tools

    I was wondering if anyone can steer me in the right direction
    please, if dreamweaver cs4 can generate the code neccessary to
    create image uploads for admin pages.
    I have been using the Data Objects - Insert and Update Record
    Insertion Form Wizzard with php and mysql and wondered if there was
    a way of adding a button to these forms with relivent code to
    insert a set of images from my desktop to my rootfolder without
    having to hand code it.
    Thanks

    Hi Henry,
    so do you currently have a column named "order" ? If so, you´ll need to rename it to "order_ord" or something.
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Multiple Image Upload and watermarking

    Hi,
    I am using a gallery script which takes main images from a dynamic folder and creates thumbnails on the fly.
    It gets the main images dynamically from
    $config['fulls'] = $_GET['imgfolder_id'];
    Then GD is applied to create thumbnails on the fly. There is no GD role for the main images. I use lightbox to show pop-up image. And the images are uploaded to a dynamic folder using ADDT multiple image upload server behavior.
    My requirement: want to apply water mark on the large (pop-up) image. Not on the thumbnail.
    Is it possible to have the water mark applied at the time of Multiple Image Upload?
    Thanks for any help
    Jay

    Hi Jay,
    if it were a single image upload, I would have suggested to apply a PHP watermark script to the uploaded image by embedding that code in a Custom Trigger, type AFTER -- but as the multiple upload gets proceeded by a flash file, I have no clue how to do that.
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Multiple Image Uploader renaming thumbnails

    I am having a blast with the ADDT! For a php noob such as myself this stuff is great, just what I have been looking for.
    If only I knew how to stop ADDT's multiple image uploader FROM RENAMING THE UPLOADED THUMBNAILS.
    Like this: myImage.jpg is renamed to myImage_135x150.jpg
    I can deal with it stashing the thumbnail in a separate folder, but the name of the uploaded image and the thumbnail must remain the same!
    I did manage to figure out where to change the thumbnails dimensions, but not the name itself...
    Thanks for such a great tool,
    Jason

    Hi Jason,
    ADDT´s default thumbnail renaming rule is defined in the file "includes/tng/triggers/tNG_DynamicThumbnail.class.php" -- at the end there´s a function named "Execute", and in here you´ll find the following:
    a) $thumbnailName = path_info['filename'].'_'.$width.'x'.$height.'_w_'.$hash.(isset($path_info['extension'])? '.'.$path_info['extension']:'');
    this needs to be changed to:
    $thumbnailName = path_info['filename'].$hash.(isset($path_info['extension'])?'.'.$path_info['extension']:' ');
    b) tNG_deleteThumbnails($thumbnailFolder, $path_info['filename'].'_'.$width.'x'.$height, $hash);
    this need to be changed to:
    tNG_deleteThumbnails($thumbnailFolder, $path_info['filename'], $hash);
    As always, please backup the original file before making such changes ;-)
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

Maybe you are looking for