In jQuery uploadify show the images as thumbnails BEFORE the upload by the user's filepath
I'd like to make an uploadify upload to my server, and make thumbnails from the user's images on the fly.
I just need the filepath for each upload. However the only parameter i found in the Javascript is the substringed filename.
Instead of ohmygoditsantaclaus.jpg
I want the full path like C:/Etc/Etcetera/Daddy/ohmygoditsantaclaus.jpg
. If i have this, i can make a div container easily p开发者_如何学运维ut the image to it, and resize it with CSS.
Thanks for the help. PS: I used Uploadify v1.6.2
Here is the jQuery Uploadify v.1.6.2 and the Uploader.FLA i currently using.
You can't access the full path with either JavaScript or Flash, like:
C:/Etc/Etcetera/Daddy/ohmygoditsantaclaus.jpg
It's a security thing.
Also, even if you could, you sure as heck can't do the next thing you want to do:
If i have this, i can make a div container easily put the image to it, and resize it with CSS.
You can't access random images on the user's hard disk using a file://
URI and place them on your webpage.
You can instead use something like http://www.plupload.com/ - once the user has selected their images to upload, you can resize images client side.
If you want to show thumbnails before uploading, I know Flash can do it. I'm not sure if anything else can.
This would be a major security problem, and for all I know, this won't and should not work.
精彩评论