Yahoo UI uploader

software development

#1

This is my first time trying to use a YUI product. I tried to set up a version of “Simple Uploader Example with Button UI” on my DH site. (http://developer.yahoo.com/yui/examples … utton.html) uploader.swf is in the assets subdirectory of the script. I’ve tried referencing the sw with a relative path and a full path. The script seems to run as well on my server as the example server. No errors, the progress bar moves across quickly on small uploads, slowly on large uploads. But I can’t find on my server any of the files that I tried to upload. I tried a couple different urls in the function upload. My version is at http://ykfp.org/php/uploader/upload1.html. Don’t know what else to try. Do YUI scripts work on DH?

This signature line intentionally blank.


#2

The YUI uploader can’t save files to your web directory on its own – on its own, it’s just a bunch of Flash and Javascript running in your web browser. You’ll need some sort of PHP or CGI script running on the web server to accept the upload and do something useful with it.


#3

I still haven’t got this to work, but I must be close. In the html page I enclosed the div with the buttons and java script in form tags with the action set to a php script:

The php script uploader2.php looks like:
http://ykfp.org/php/uploader/uploader2.txt

The UI seems to work but the php script doesn’t echo back that the file got uploaded or not.

I’ve done this kind of thing in perl before to let colleagues send me files to a directory protected by htaccess but I alway wished my perl version had a progress bar.

This signature line intentionally blank.