upload multiple files with the flash upload control€¦ · upload multiple files with the flash...

18
Upload Multiple Files with The Flash Upload Control DMXzone.com Introduction We are going to create 3 pages; an intro page which shows an introduction for the user and it generates a unique id that we use to create a unique folder. Copyright © 2008 DMXzone.com All Rights Reserved To get more go to DMXzone.com Page 1 of 18

Upload: others

Post on 12-Jun-2020

59 views

Category:

Documents


0 download

TRANSCRIPT

Upload Multiple Files with The Flash Upload Control DMXzone.com

Introduction We are going to create 3 pages; an intro page which shows an introduction for the user and it generates a unique id that we use to create a unique folder.

Copyright © 2008 DMXzone.com All Rights Reserved To get more go to DMXzone.com

Page 1 of 18

Upload Multiple Files with The Flash Upload Control DMXzone.com

The second page will use Pure ASP Upload 3 to upload and Smart Image Processor 2 to resize images. The page contains the multiple upload control to upload multiple images at once.

Copyright © 2008 DMXzone.com All Rights Reserved To get more go to DMXzone.com

Page 2 of 18

Upload Multiple Files with The Flash Upload Control DMXzone.com

The third page will use File Genie to display the uploaded images.

Before you begin

1. Setting up your site First we need a site within Dreamweaver with the Server Model set to ASP VBScript. You can create a new one or use an existing one.

2. Creating the files In the Files panel we are going to create the 3 files needed for our project. Create the files and call the intro.asp, upload.asp and result.asp.

3. Creating an upload folder Create an upload folder on your server and name it upload, make sure it has write and delete permissions. You need to set these for ASP and ASP.NET. Please read this tutorial that explains how to set your security settings. Also read this FAQ and this FAQ for more information. If you plan to upload large files, read this FAQ.

4. Requirements Make sure you’ve installed Pure ASP Upload 3, Smart Image Processor 2 and File Genie.

Copyright © 2008 DMXzone.com All Rights Reserved To get more go to DMXzone.com

Page 3 of 18

Upload Multiple Files with The Flash Upload Control DMXzone.com

Creating The Intro Page 1. Open the intro.asp file by double clicking it in the Files panel.

2. You can now type your introduction text in the design view. We used a background image, and the

introduction text of this demo but of course you can use your own text and mark-up.

3. Next we need a link to the following page, create a link by selecting a text or image which you want to use as continue button and in the Property inspector type upload.asp?sid=<%=Session.SessionID%> into the Link field. <%=Session.SessionID%> will create our unique id that we are going to use as folder.

4. Save the file.

The Upload Page 1. Open the upload.asp by double clicking it in the Files panel.

2. Go to the Bindings panel and click the plus button and select Request Variable.

Set Type to Request.QueryString and set the Name to sid and press OK

Copyright © 2008 DMXzone.com All Rights Reserved To get more go to DMXzone.com

Page 4 of 18

Upload Multiple Files with The Flash Upload Control DMXzone.com

3. In the Insert panel go to the Forms tab and click the Flash Upload Control.

4. Set the Upload Folder to “upload/” & Request.QueryString(“sid”).

5. In the Allowed Files dropdown choose Images to restrict the allowed file uploads to files with on of the following extensions GIF,JPG,JPEG,BMP and PNG.

Copyright © 2008 DMXzone.com All Rights Reserved To get more go to DMXzone.com

Page 5 of 18

Upload Multiple Files with The Flash Upload Control DMXzone.com

Copyright © 2008 DMXzone.com All Rights Reserved To get more go to DMXzone.com

Page 6 of 18

Upload Multiple Files with The Flash Upload Control DMXzone.com

6. Select the Browse button in the After Upload field and select the result.asp.

Copyright © 2008 DMXzone.com All Rights Reserved To get more go to DMXzone.com

Page 7 of 18

Upload Multiple Files with The Flash Upload Control DMXzone.com

7. Select the Parameters… button

Copyright © 2008 DMXzone.com All Rights Reserved To get more go to DMXzone.com

Page 8 of 18

Upload Multiple Files with The Flash Upload Control DMXzone.com

8. Enter sid in the Name field, select the lightning bold on the right side of the value field and select Request -> QueryString.sid and press OK (4x).

Copyright © 2008 DMXzone.com All Rights Reserved To get more go to DMXzone.com

Page 9 of 18

Upload Multiple Files with The Flash Upload Control DMXzone.com

In the Server Behaviors panel Click the plus button and from the dropdown choose DMXzone > Smart Image Processor 2.

Copyright © 2008 DMXzone.com All Rights Reserved To get more go to DMXzone.com

Page 10 of 18

Upload Multiple Files with The Flash Upload Control DMXzone.com

9. Check the Resize checkbox and fill in 150 in the Width and Height fields.

10. Click OK and save the file.

Copyright © 2008 DMXzone.com All Rights Reserved To get more go to DMXzone.com

Page 11 of 18

Upload Multiple Files with The Flash Upload Control DMXzone.com

The Result Page 1. Open the result.asp.

2. In the Server Behaviors panel click the plus button and from the dropdown choose DMXzone > File

Genie > Folder List.

Copyright © 2008 DMXzone.com All Rights Reserved To get more go to DMXzone.com

Page 12 of 18

Upload Multiple Files with The Flash Upload Control DMXzone.com

3. In the Folder List Name field type images.

4. Set the Folder to “upload/” & Request.QueryString(“sid”).

Copyright © 2008 DMXzone.com All Rights Reserved To get more go to DMXzone.com

Page 13 of 18

Upload Multiple Files with The Flash Upload Control DMXzone.com

5. Set Allowed Extensions to Images Only.

6. Click OK.

Copyright © 2008 DMXzone.com All Rights Reserved To get more go to DMXzone.com

Page 14 of 18

Upload Multiple Files with The Flash Upload Control DMXzone.com

7. Choose Insert -> Image

Copyright © 2008 DMXzone.com All Rights Reserved To get more go to DMXzone.com

Page 15 of 18

Upload Multiple Files with The Flash Upload Control DMXzone.com

8. Select Data sources, select Path and press OK.

Copyright © 2008 DMXzone.com All Rights Reserved To get more go to DMXzone.com

Page 16 of 18

Upload Multiple Files with The Flash Upload Control DMXzone.com

Select the image. In the Server Behaviors panel click the plus button and from the dropdown choose DMXzone > File Genie > Folder List Table.

Copyright © 2008 DMXzone.com All Rights Reserved To get more go to DMXzone.com

Page 17 of 18

Upload Multiple Files with The Flash Upload Control DMXzone.com

9. Choose the number of Columns you like to display, select All Records and press OK.

10. Save the file.

Final Steps If you have a local web server then you can test immediately, otherwise upload all the files to your web server first. Don’t forget the ScriptLibrary folder and dmxPureUpload.swf.

Copyright © 2008 DMXzone.com All Rights Reserved To get more go to DMXzone.com

Page 18 of 18