close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Problem Upload/Resize png files

Thread began 7/08/2010 3:36 am by paulshoe379536 | Last modified 7/14/2010 5:25 pm by Jimmy Wu | 805 views | 6 replies |

paulshoe379536

Problem Upload/Resize png files

I have a form to upload and resize an image. This appears to be working correctly when I upload a JPG or PNG-8. If I try to upload a PNG-24, it removes the transparency properties of the image and makes the background white. I have ResizeFillColor' => "", but this doesn't help.

What did I miss and what might I be doing wrong?

That section of code below:
-------------------------------------------------------------------------
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => $_SESSION['sponsorImagePath'],
'FileName' => "[FileName]",
'DefaultFileName' => "".((isset($_FILES["sponsorLogo"]))?$_FILES["sponsorLogo"]["name"]:"") ."",
'ResizeType' => "4",
'ResizeWidth' => "175",
'ResizeHeight' => "150",
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST)){
WA_DFP_UploadFiles("WA_UploadResult1", "sponsorLogo", "3", "[ExistingFileName]_tmp", "true", $WA_UploadResult1_Params);
}
?>
--------------------------------------------------------------------------

Sign in to reply to this post

Jimmy Wu

This is currently an issue that we are working on. If you aren't resizing the image, you should do a regular file upload instead of a web images only upload.

Sign in to reply to this post

paulshoe379536

Jimmy,

Unfortunately, PNG files are the primary choice for this use, although they may choose to use JPGs. I believe that I need to make sure that the images are resized during the upload rather than relying on the member to get them right. Also, is there an way to limit the file size that they are attempting to upload?

Do you think the fix for the PNG-24 files will be ready soon? I'll need to come up with some kind of work around if not. Please advise.

Thank you for your help,
Paul

Sign in to reply to this post

paulshoe379536

If I set the resize option to "None" and the upload still rebuilds my PNG file and jumbles it up.

If I uncheck "Web Images Only", then it will upload the file as is. If I use this as a work-a-round method, how do I insure that the file that is uploaded is a valid image file?

Sign in to reply to this post

Jimmy Wu

It looks like you have CSS Form Builder, so you can apply some form validation to check if the extension is correct.

To apply this validation, you would want to go to Insert->WebAssist->CSS Form Builder->Client Validation. This should open up an interface to add the validation. You would want to choose the form and the form field and then from the dropdown choose File Extension for the validation type. Then click the plus button and add the validation.

I'm not sure when the fix for the PNG-24 will be ready, so you may want to go with this workaround for now.

Sign in to reply to this post

paulshoe379536

using the Client Validation has made a good work-a-round for the problem with the PNG files...

Could you please let me know as soon as that is fixed?

Sign in to reply to this post

Jimmy Wu

If the fix is a simple one, we will post a known issues sticky at the top of the forum.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...