Pure ASP.NET Upload 2 AddOn Manual
Pure ASP Upload Add On Pack - Delete File Before Update
The Delete File Before Update extension enables you to delete an image and associated thumbnail from your server, and its filename from your database, before replacing it with a new image. Delete File Before Update works with Pure ASP Upload, Smart Image Processor, and Dreamweaver's standard "Update Record" Server Behavior.
How to do it
- Open page
You should place the "Delete File Before Update" Server Behavior on a page where you have placed already the "Update Record" Server Behavior.
- First apply the Pure ASP Upload 2.09 behavior
Before you can apply the Delete File Before Update extension, you have to upload the new image.
1. From the Server Behaviors panel select DMXzone - Pure ASP Upload 2.09.
2. Browse to the folder where the images will need to be uploaded to.
3. You can uncheck the Require Upload option to give the user the ability to update without uploading a new image.
4. Leave Go To After Uploading empty, since we are not done after this.
5. Click CTRL-S to save the file.
- To make it even better, let's apply the Smart
Image Processor extension
This is optional. If you have not purchased this extension and would like more info click here.
You will find the Smart Image Processor panel under Server Behaviors. Click on the + sign, DMXzone, Smart Image Processor.
- Open the Smart Image Processor panel
This will Open the Smart Image Processor Panel.
In Use Server Component select the server component that
is installed on the server that you are using. If you don't know or are not
sure, leave it on Auto Detect.
In Upload Folder you can browse to the folder where the files are being uploaded.
In Width & Height enter the maximum amount of pixels
you want the image to be.
The image will adjust to that size with the aspect ratio in mind.
Check the "Make Thumbnails" option and enter Width &
Height of the required thumbnails.
The image will adjust to that size with the aspect ratio in mind.
Create a Suffix for your thumbnail images, so your thumbnail will be saved with the regular image. All thumbnail filenames will end with this suffix. If you change the default suffix, make sure you remember what suffix you did use when you want to display the thumbnail on your page.
The image will be resaved as a jpeg. You can adjust the quality of the image. 80 is normal quality.
To apply the Smart Image Processor behavior click OK.
A message box appears to tell you that the file called incResizeAddOn.asp
has been copied to your site in the ScriptLibrary folder. Click OK.
Save your work.
- Delete File Before Update
Now you can apply the Delete File Before Update Server Behavior. Open the
Server Behaviors panel.
Click on the + sign, DMXzone and Delete File Before
Update.
This looks easy. There are only two options. Browse to the folder where your
images are uploaded to and enter the suffix you used for the Thumbnails. It
defaults to _small.
Click OK.
- Save the file in your site
You will need to save the file in your site. Now you are ready to go!