It's a great demo - and I love the thumbs - it would be nice to have it like that, and allow the user to edit the photos if they wish. I have spoken to the support guru at swf at one point and this is what he told me concerning this issue - at this point in time, I have not been able to replicate the thumbs in the PP version of SWF - which is where Michael may come in?
Here is the info on how the process works - maybe Michael understands what he is saying in a bit more detail..
Quote:
How you display thumbnails all depends on your application. There isn't a lot we can tell you.
In the Application Demo it works like this:
1) file uploaded
2) file received by upload.php
3) upload.php reads the file from the temp location where PHP stores it
4) upload.php creates a thumbnail
5) upload.php outputs the thumbnail to the buffer but then captures the buffer into a variable. This way we never have to save any files (which is what we want for the demos but in real applications you'd probably never do it this way).
6) upload.php creates a big random string (BRS)and stores the thumbnail data in the session using the BRS as the key.
7) upload.php outputs the BRS back to the client (SWFUpload)
8) SWFUpload receives the BRS in uploadSuccess(file, serverData)
9) SWFUpload creates a new <img> tag with thumbnail.php as the SRC passing the BRS on the query string.
10) thumbnail.php gets the BRS, retrieves the thumbnail data from the session and outputs it (dynamically generating the image requested by the <IMG> tag.
That whole process it kind of dumb because you wouldn't do it that way in a real application. You'd probably save the thumbnail image to the disk and just return the URL to SWFUpload and load the thumbnail directly. Or you'd store the thumbnail in the database and return an ID to SWFUpload and have thumbnail.php load the thumbnail from the database. You'd probably not muck around so much with the session. But for the purposes of the demos we don't want to save your test files so we just use the session or completely ignore the file.
You'll have to figure out how to make things work in your application. It takes a big of server side and client side programming to make it all work together.
|