close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Uploading files - update - DFPv2

Thread began 5/25/2009 8:25 am by john.molitor259030 | Last modified 6/09/2009 7:54 am by john.molitor259030 | 2308 views | 3 replies

fragop363190

Check the Flash Tutorials of DFP2 everything is there.

As soon as i have time ill try posting a Full Guide about creating a full admin panel with DataAssist and DFP2 etc.

Nobody mentions in the forum about deleting files while deleting the record in db...
You need to delete file or youll have your server with too many orphans.
Also when you generate thumbnails you need to add another DELETE behavior for them and need to manualy code the 2nd behavior which should be set after DELETE1 succesfully completes. Manually code for the _thumb or any suffixes you use on the UPload behavior.

I promise ill write a small guide for all people that need it so its step by step.

Hope i helped you.

BTW u need delete file behavior on both update and detail page (if you have added the option to add a delete button there) and delete page if you have it created separately for confirmation.

And if you using thumbs, u need a 2nd 3rd 4th (as many file resizes u got in your upload behavior including your first file, in general as many file things u see in DFP2 file box that you have added you need so many Delete behaviors in the appropriate page to work, but with the 2nd+ behaviors set to run after DELETE1 has been succesfully completed.


This is what u need to manually code in DELETE2 +

<?php
$WA_DeleteFileResult1 = false;
if(isset($_POST["Delete_x"])){
$WA_DeleteFileResult1 = WA_FileAssist_DeleteFile("../assets/images/photos/", $row_WADAimages_img['filename_img']);
}?>
<?php
$WA_DeleteFileResult2 = false;
if($WA_DeleteFileResult1){
$WA_DeleteFileResult2 = WA_FileAssist_DeleteFile("../assets/images/photos/", str_replace(".jpg","_thumb.jpg",$row_WADAimages_img['filename_img']));
}
?>

depending on what extensions you use (i force all to be made jpg as im working with logos and i dont care about transpaency and its easier for delete behavior) you do the str_replace thing. I got 1 thumbnail created. [Filename]_thumb.jpg so i take the original [Filename].jpg and change it to it by using the str_replace function. It is very easy. If you got 5 thumbs, _thumb1,_thumb2 you need to copy paste the <?php ?> code as many times and change the DeleteFileResult2 to DeleteFileResult(numbering) and the _thumb.jpg to _thumb(numbering) etc.

Or you can add the server behavior from the behaviors panel and just add the str_replace thing on the box or manualy after at code.

Hope this helps a lot of people.

By the way, new helper file of DFP2 works properly. Goo job WebAssist.

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