[ Поиск ] - [ Пользователи ] - [ Календарь ]
Полная Версия: SWFUpload
olgatcpip
Всем привет.

Есть тут те, кто работал с SWFUpload?


У меня вставлен на сайте site.ru файлы отправляются на s1.site.ru/test.php, т.е. на поддомен.
Пробую использовать SWFUpload, и выводится ошибка Error #2049

Я вывела дебаг на струницу
---SWFUpload Instance Info---
Version: 2.5.0 2010-01-15 Beta 2
Movie Name: SWFUpload_0
Settings:
upload_url: http://s1.site.ru/test.php
flash_url: ../swfupload/swfupload.swf?preventswfcaching=1339149612021
flash9_url: ../swfupload/swfupload_fp9.swf?preventswfcaching=1339149612021
use_query_string: false
requeue_on_error: false
http_success:
assume_success_timeout: 0
file_post_name: Filedata
post_params: [object Object]
file_types: *.*
file_types_description: All Files
file_size_limit: 100 GB
file_upload_limit: 100
file_queue_limit: 0
debug: true
prevent_swf_caching: true
button_placeholder_id: spanButtonPlaceholder
button_placeholder: Not Set
button_image_url: /tmp/demos/swfobjectdemo/XPButtonUploadText_61x22.png
button_width: 61
button_height: 22
button_text:
button_text_style: color: #000000; font-size: 16pt;
button_text_top_padding: 0
button_text_left_padding: 0
button_action: -110
button_cursor: -1
button_disabled: false
custom_settings: [object Object]
Event Handlers:
swfupload_preload_handler assigned: true
swfupload_load_failed_handler assigned: true
swfupload_loaded_handler assigned: true
mouse_click_handler assigned: false
mouse_over_handler assigned: false
mouse_out_handler assigned: false
file_dialog_start_handler assigned: false
file_queued_handler assigned: true
file_queue_error_handler assigned: true
upload_resize_start_handler assigned: false
upload_start_handler assigned: true
upload_progress_handler assigned: true
upload_error_handler assigned: true
upload_success_handler assigned: true
upload_complete_handler assigned: true
debug_handler assigned: true
Support:
Load: Yes
Image Resize: Yes

SWF DEBUG: SWFUpload Init Complete
SWF DEBUG:
SWF DEBUG: ----- SWF DEBUG OUTPUT ----
SWF DEBUG: Version: 2.5.0 2010-02-17 Beta 3
SWF DEBUG: movieName: SWFUpload_0
SWF DEBUG: Upload URL: http://s1.site.ru/test.php
SWF DEBUG: File Types String: *.*
SWF DEBUG: Parsed File Types:
SWF DEBUG: HTTP Success: 0
SWF DEBUG: File Types Description: All Files (*.*)
SWF DEBUG: File Size Limit: 107374182400 bytes
SWF DEBUG: File Upload Limit: 100
SWF DEBUG: File Queue Limit: 100
SWF DEBUG: Post Params:
SWF DEBUG: HELLO-WORLD=Here I Am
SWF DEBUG: .what=OKAY
SWF DEBUG: PHPSESSID=NONE
SWF DEBUG: ----- END SWF DEBUG OUTPUT ----
SWF DEBUG:
SWF DEBUG: Stage Resize:61 by 22
SWF DEBUG: Button Image Loaded
SWF DEBUG: Stage Resize:61 by 22
SWF DEBUG: Event: fileDialogStart : Browsing files. Multi Select. Allowed file types: *.*
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: StartUpload(): Upload Type: Normal.
SWF DEBUG: Global Post Item: HELLO-WORLD=Here I Am
SWF DEBUG: Global Post Item: .what=OKAY
SWF DEBUG: Global Post Item: PHPSESSID=NONE
SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for standard upload. Starting upload to http://s1.site.ru/test.php for File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadError : Security Error : File Number: SWFUpload_0_0. Error text: Error #2049
SWF DEBUG: Event: uploadComplete : Upload cycle complete.
Error Code: Security Error, File name: 14.jpg, Message: Error #2049


нужна помощь, совет или идея почему не получается



Спустя 7 минут, 37 секунд (8.06.2012 - 12:37) Игорь_Vasinsky написал(а):
тут по моему вопрос безопасности.

вы как адрес в папку донера прописываете? у вас где папка поддомена? в корне основного сайта?

Спустя 7 минут, 50 секунд (8.06.2012 - 12:45) Семён написал(а):
crossdomain.xml - есть на поддомене?

Спустя 1 минута, 56 секунд (8.06.2012 - 12:47) olgatcpip написал(а):
Цитата
вы как адрес в папку донера прописываете? у вас где папка поддомена? в корне основного сайта?


1 - кто такой донер?
2 - папка поддомена - сервер один, как разные сайты корневые папки на одном уровне

я пробую работать с демо версией


<!DOCTYPE html>
<html>
<head>
<title>
SWFUpload Demos - Graceful Degradation Demo</title>
<link
href="../css/default.css" rel="stylesheet" type="text/css" />
<script
type="text/javascript" src="../swfupload/swfupload.js"></script>
<script
type="text/javascript" src="../swfupload/swfupload.queue.js"></script>
<script
type="text/javascript" src="js/fileprogress.js"></script>
<script
type="text/javascript" src="js/handlers.js"></script>
<script
type="text/javascript">
var
swfu;

SWFUpload.onload = function () {
var settings = {
flash_url : "../swfupload/swfupload.swf",
flash9_url : "../swfupload/swfupload_fp9.swf",
upload_url: "http://s1.site.ru/test.php",
//upload_url: "upload.php",
post_params: {
"PHPSESSID" : "NONE",
"HELLO-WORLD" : "Here I Am",
".what" : "OKAY"
},
file_size_limit : "100 GB",
file_types : "*.*",
file_types_description : "All Files",
file_upload_limit : 100,
file_queue_limit : 0,
custom_settings : {
progressTarget : "fsUploadProgress",
cancelButtonId : "btnCancel"
},
debug: true,

// Button Settings
button_image_url : "XPButtonUploadText_61x22.png",
button_placeholder_id : "spanButtonPlaceholder",
button_width: 61,
button_height: 22,

// The event handler functions are defined in handlers.js
swfupload_preload_handler : swfUploadPreLoad,
swfupload_load_failed_handler : swfUploadLoadFailed,
swfupload_loaded_handler : swfUploadLoaded,
file_queued_handler : fileQueued,
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,
upload_start_handler : uploadStart,
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,
queue_complete_handler : queueComplete // Queue plugin event

};

swfu = new SWFUpload(settings);
}

</script>
</head>
<body>
<div
id="header">
<h1
id="logo"><a href="../">SWFUpload</a></h1>
<div
id="version">v2.5.0</div>
</div>

<div
id="content">

<h2>
SWFObject Demo</h2>
<form
id="form1" action="index.php" method="post" enctype="multipart/form-data">
<p>
This page demonstrates SWFUpload's use of the swfobject library to gracefully degrade the page.</p>
<p>

SWFUpload provides a variety of events to notify your application whether SWFUpload will be able to load properly.
Rather than SWFUpload simply degrading automatically it leaves complete control in the hands of the developer to degrade
in a way appropriate to the application.
</p>

<p>
Do each of the following (one at a time) to see the plugin work: </p>
<ul>
<li>
Uninstall your Flash Player or install a version less than 9.0.28</li>
<li>
Cause the SWF file to fail to load by deleting or renaming swfupload.swf (simulating a very slow or failed download)</li>
<li>
Disable JavaScript</li>
</ul>
<p>

Each of these tests demontrate how these issues can be handled by SWFUpload and the swfobject libraries.
</p>

<div
id="divSWFUploadUI" style="margin-top: 20px;">
<div
class="fieldset flash" id="fsUploadProgress">
<span
class="legend">Upload Queue</span>
</div>
<p
id="divStatus">0 Files Uploaded</p>
<p>
<span
id="spanButtonPlaceholder"></span>
<input
id="btnCancel" type="button" value="Cancel All Uploads" disabled="disabled" style="margin-left: 2px; height: 22px; font-size: 8pt;" />
<br />
</p>
</div>
<noscript>
<div
style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px;">
We're sorry. SWFUpload could not load. You must have JavaScript enabled to enjoy SWFUpload.
</div>
</noscript>
<div
id="divLoadingContent" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
SWFUpload is loading. Please wait a moment...
</div>
<div
id="divLongLoading" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
SWFUpload is taking a long time to load or the load has failed. Please make sure that the Flash Plugin is enabled and that a working version of the Adobe Flash Player is installed.
</div>
<div
id="divAlternateContent" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
We're sorry. SWFUpload could not load. You may need to install or upgrade Flash Player.
Visit the <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash& quot;>Adobe website</a> to get the Flash Player.
</div>
</form>
</div>
</body>
</html>


Спустя 47 секунд (8.06.2012 - 12:47) olgatcpip написал(а):
Цитата
crossdomain.xml - есть на поддомене?

нет, а что это?

Спустя 1 минута, 24 секунды (8.06.2012 - 12:49) Семён написал(а):
olgatcpip, прочитай что это такое в Google, создаешь этот файлик с нужным правилом и будет все работать.

Содержимое типо такого:
Цитата
<cross-domain-policy>
<allow-access-from domain="*" to-ports="80"/>
</cross-domain-policy>

Спустя 16 часов, 6 минут, 45 секунд (9.06.2012 - 04:56) olgatcpip написал(а):
Ребята, я прям не знаю что я делаю не так.

запихала и в корень сайта и в папку куда отправляю запрос....

crossdomain.xml такой
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from
domain="*" />
</cross-domain-policy>


сам test.php
<?php
header('HTTP/1.0 200 OK');
?>
все равно пришет ту же ошибку

Спустя 4 часа, 4 минуты, 11 секунд (9.06.2012 - 09:00) olgatcpip написал(а):
уже и другой crossdomain.xml сделала
<cross-domain-policy>
<allow-access-from
domain="*"/>
</cross-domain-policy>


спросила товарищей.. они не работали с SWFUpload, но загрузку файлов через флеш делали, сказали что должноработать :( Может я косой флеш скачала ?


_____________
Ласковое слово и кошке приятно... Плюсик в карму сойдет wink.gif
*smarty дока - новая любовь
Моё рукотворение ругайте, хвалите smile.gif
Веду маленький блог
в этом блоге публикую новые работы
WMR217126627282 wink.gif

Быстрый ответ:

 Графические смайлики |  Показывать подпись
Здесь расположена полная версия этой страницы.
Invision Power Board © 2001-2024 Invision Power Services, Inc.