I downloaded and installed SWFUpload 2.1.0. When I select a file for upload, the 'uploadProgress' event gets kicked off fine, it says it's uploading, but nothing ever happens. The last thing (in the debug window) I see is:
SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0
I've checked the server logs, and there are no errors. It's like the request is not even made/executed. Has anyone seen this type of behavior before?
I'm running locally on mac os x (leopard), Firefox 2.0.0.14, apache 2.0. I've attached the debug output (from SWFUpload) in the attached debug.txt.
Any advice would be much appreciated.
| Attachment | Size |
|---|---|
| debug.txt | 2.7 KB |
Mac Flash Player
I hear that Flash Player for Mac doesn't like to upload when you include a :port in your URL. So your problem might be that you are uploading to http://localhost:8888
Try putting your webserver on port 80 and see if it works. If you verify that there is a Flash Player bug I'll add it to the docs and I'll look to see if there is some kind of work around we can implement in SWFUpload.
I have SWFUpload 2.0.2
I have SWFUpload 2.0.2 installed on another site (locally) and it works fine with the port number. See debug info below:
----- SWFUPLOAD SETTINGS ----
ID: undefined
upload_url: http://localhost:8888/mayarts/springboard/client.php?handler=store:Uploa...
file_post_name: Filedata
post_params: {
}
file_types: *.gif;*.jpg;*.png;*.jpeg
file_types_description: Image files...
file_size_limit: 15728640
file_upload_limit: 0
file_queue_limit: 0
flash_url: http://localhost:8888/mayarts/springboard/lib/swfupload/swfupload_f9.swf
flash_width: 1px
flash_height: 1px
flash_color: #FFFFFF
debug_enabled: true
----- SWFUPLOAD SETTINGS END ----
SWF DEBUG: SWFUpload Init Complete
SWF DEBUG:
SWF DEBUG: ----- SWF DEBUG OUTPUT ----
SWF DEBUG: Build Number: SWFUPLOAD 2.0.2 FP9 2008-01-07 0001
SWF DEBUG: movieName: SWFUpload_0
SWF DEBUG: Upload URL: http://localhost:8888/mayarts/springboard/client.php?handler=store:Uploa...
SWF DEBUG: File Types String: *.gif;*.jpg;*.png;*.jpeg
SWF DEBUG: Parsed File Types: gif,jpg,png,jpeg
SWF DEBUG: File Types Description: Image files... (*.gif;*.jpg;*.png;*.jpeg)
SWF DEBUG: File Size Limit: 16106127360 bytes
SWF DEBUG: File Upload Limit: 0
SWF DEBUG: File Queue Limit: 0
SWF DEBUG: Post Params:
SWF DEBUG: ----- END SWF DEBUG OUTPUT ----
SWF DEBUG:
Flash called back and is ready.
SWF DEBUG: Event: fileDialogStart : Browsing files. Multi Select. Allowed file types: *.gif;*.jpg;*.png;*.jpeg
SWF DEBUG: Select Handler: Files Selected from Dialog. Processing file list
SWF DEBUG: Event: fileQueued : File ID: SWFUpload_0_0
SWF DEBUG: Event: fileDialogComplete : Finished adding files
SWF DEBUG: StartUpload(): Starting Upload: First file in queue
SWF DEBUG: StartFile: First file in queue
SWF DEBUG: Event: uploadStart : File ID: SWFUpload_0_0
SWF DEBUG: startFile(): File Reference found. File accepted by startUpload event. Starting upload to http://localhost:8888/mayarts/springboard/client.php?handler=store:Uploa... for File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadSuccess: File ID: SWFUpload_0_0 Data:
SWF DEBUG: Event: uploadComplete : Upload cycle complete.
Any other ideas/suggestions?
I changed the port # to 80,
I changed the port # to 80, as you suggested. Same result.
---SWFUpload Instance Info---
Version: 2.1.0
Movie Name: SWFUpload_0
Settings:
upload_url: http://localhost/rich/springboard/client.php
use_query_string: false
file_post_name: Filedata
post_params: [object Object]
file_types: *.gif;*.jpg;*.png;*.jpeg
file_types_description: Image files...
file_size_limit: 15728640
file_upload_limit: 0
file_queue_limit: 0
flash_url: http://localhost/rich/springboard/lib/swfupload/swfupload_f9.swf
flash_color: #FFFFFF
debug: true
custom_settings: [object Object]
Event Handlers:
swfupload_loaded_handler assigned: false
file_dialog_start_handler assigned: false
file_queued_handler assigned: true
file_queue_error_handler assigned: true
upload_start_handler assigned: true
upload_progress_handler assigned: true
upload_error_handler assigned: true
upload_success_handler assigned: true
upload_complete_handler assigned: false
debug_handler assigned: true
SWF DEBUG: SWFUpload Init Complete
SWF DEBUG:
SWF DEBUG: ----- SWF DEBUG OUTPUT ----
SWF DEBUG: Build Number: SWFUPLOAD 2.1.0 FP9 2008-03-12
SWF DEBUG: movieName: SWFUpload_0
SWF DEBUG: Upload URL: http://localhost/rich/springboard/client.php
SWF DEBUG: File Types String: *.gif;*.jpg;*.png;*.jpeg
SWF DEBUG: Parsed File Types: gif,jpg,png,jpeg
SWF DEBUG: File Types Description: Image files... (*.gif;*.jpg;*.png;*.jpeg)
SWF DEBUG: File Size Limit: 16106127360 bytes
SWF DEBUG: File Upload Limit: 0
SWF DEBUG: File Queue Limit: 0
SWF DEBUG: Post Params:
SWF DEBUG: type=batch
SWF DEBUG: handler=listings:UploadImage
SWF DEBUG: id=2
SWF DEBUG: ----- END SWF DEBUG OUTPUT ----
SWF DEBUG:
SWF DEBUG: Event: fileDialogStart : Browsing files. Multi Select. Allowed file types: *.gif;*.jpg;*.png;*.jpeg
SWF DEBUG: Select Handler: Received the files selected from the dialog. Processing the file list...
SWF DEBUG: Event: fileQueued : File ID: SWFUpload_0_0
SWF DEBUG: Event: fileDialogComplete : Finished processing selected files. Files selected: 1. Files Queued: 1
SWF DEBUG: StartUpload: First file in queue
SWF DEBUG: Event: uploadStart : File ID: SWFUpload_0_0
SWF DEBUG: Global Post Item: type=batch
SWF DEBUG: Global Post Item: handler=listings:UploadImage
SWF DEBUG: Global Post Item: id=2
SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload. Starting upload to http://localhost/rich/springboard/client.php for File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0
Stumped
I can't figure what might be causing this issue. Have you tried uninstalling/re-installing Flash? What version of Flash to you have? Do you have some kind of Proxy server or Anti-virus package that might be interferring?
I'm stumped too!
Yes, I'm stumped too! I just uninstalled/reinstalled Flash. Current version installed is 9.0.124. There is no proxy server or anit-virus running (all is disabled right now).
I decided to go ahead and upload to the server to see if the behavior continues. Well, on the server, I have a bit more progress than I do locally, but it still doesn't behave correctly. When I select a file, it starts uploading, but it's like the 'oncomplete' (if that's even the correct name) event doesn't get fired. The file is only 168KB.
SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload. Starting upload to http://studio430.com/new/springboard/client.php for File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 65536. Total: 171152
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 67584. Total: 171152
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 69632. Total: 171152
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 71680. Total: 171152
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 75776. Total: 171152
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 83968. Total: 171152
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 100352. Total: 171152
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 108544. Total: 171152
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 116736. Total: 171152
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 126976. Total: 171152
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 129024. Total: 171152
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 147456. Total: 171152
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 155648. Total: 171152
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 157696. Total: 171152
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 171152. Total: 171152
Flash/uploader just stops here (and the progress on my GUI shows 100%).
Any more ideas?
Return data
For the swfupload_f9.swf you MUST return some data from your upload.php script or uploadSuccess/uploadComplete will not fire. This is especially problematic on Mac.
Bug with Flash Player (9.0.124)
Silverstripe uses SWFUpload for file uploads. Unfortuntely we have discovered if running the current latest flash player (9.0.124) the progress bar fills up but files are not uploaded.
This applies to all browsers on all OS's. (windows xp/vista and Kubuntu Linux). Using SWFUpload 2.0.2.
Using flash player 9.0 r48 means things work fine.
Any ideas on how to fix this apart from changing flash versions?
See thread on the topic
Thanks
Delphinus
Nothing specific
I'm afraid there isn't enough to go on with the little information you've provided. Even the thread at the Silverstripe site doesn't really provide any information other than "it doesn't work".
If the progress bar fills up then Flash thinks it's sending the file. The server appear not to be accepting it, or the upload script could be totally built wrong. There's no way to tell what is going on from the information given.
How can I help
I understand completely. Please let me know what I can do to provide more information for you.
Logs, running test code, etc etc.
Is what is at
Is what is at http://demo.swfupload.org/applicationdemo/index.php exactly the same as in the 2.0.2 download demos folder please?
When trying the application
When trying the application demo on my server, apache logs show the following:
[22/May/2008:13:14:25 +1200] "POST /upload/swfupload/demos/applicationdemo/upload.php HTTP/1.1" 200 32 "-" "Shockwave Flash"
[22/May/2008:13:14:25 +1200] "GET /upload/swfupload/demos/applicationdemo/thumbnail.php?id=2ca50535b83e9b26c904fbfc8f25ff5f HTTP/1.1" 404 - "http://domain.net.nz/upload/swfupload/demos/applicationdemo/index.php" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14"
Am trying to figure out the 404....
200 Success!
According to your log SWFUpload POSTed the file to upload.php and PHP reported a 200 Success. Of coarse, PHP lies about success even when it has an error. So you need to debug your upload.php script. The Application Demo requires GD.
The v2.0.2 demos are not exactly the same as the v2.1.0 demos. SWFUpload has changed significantly between v2.0.2 and v2.1.0 although the API has remained mostly consistent. You may even be able to run the v2.0.2 demo with v2.1.0 SWFupload Core but I can't guarantee it.
You especially can't run v2.0.2 swfupload.js on top of v2.1.0 swfupload_f9.swf.
Is it possible to upload the
Is it possible to upload the 2.0.2 demo's somewhere onto your server (demo2.swfupload.org?) so I can make sure the same code is running and verify 100% that its not a server issue?
At the moment using the same browser, your demo's work, but the demo I downloaded and put on my server does not work.
I have GD installed - phpinfo shows:
GD Support enabled
GD Version bundled (2.0.34 compatible)