Plupload で不可思議な問題が発生しました。
私は MVC と Amazon S3 で使用しています。サンプルを取得すると、すべて正常に動作します。
したがって、現在 HomeController Index ビューにあります。
したがって、localhost/ に移動すると、問題なく動作します。
localhost/Home に移動すると、_Flash_Container が邪魔をしているため、[ファイルの追加] ボタンをクリックできません。
Firebugを使用して「ファイルを追加」ボタンを押しても何もしません。
誰にもアイデアはありますか?
私のコードは次のとおりです。
@model MVC3PluploadToAmazonS3.ViewModels.FileUploadViewModel
@{
ViewBag.Title = "Index";
}
<h2>Upload to Amazon S3</h2>
<div id="uploader">
<p>You browser doesn't have Flash, Silverlight, Gears, BrowserPlus or HTML5 support.</p>
</div>
<input type="hidden" name="key" value="@Model.FileId-${filename}">
<input type="hidden" name="AWSAccessKeyId" value="@Model.PublicKey">
<input type="hidden" name="acl" value="@Model.Acl">
<input type="hidden" name="success_action_redirect" value="@Model.RedirectUrl">
<input type="hidden" name="policy" value="@Model.Policy">
<input type="hidden" name="signature" value="@Model.Signature">
@section scriptFiles {
<script>
$(document).ready(function () {
$("#uploader").plupload({
//amazon settings.
runtimes: 'flash,silverlight',
url: 'https://rapplex.s3-eu-west-1.amazonaws.com',
max_file_size: '100000000mb',
multipart: true,
multipart_params: {
'key': '${filename}', // use filename as a key
'Filename': '${filename}', // adding this to keep consistency across the runtimes
'acl': $('#Acl').val(),
'Content-Type': 'binary/octet-stream',
'success_action_status': '201',
'AWSAccessKeyId': $('#AWSAccessKeyId').val(),
'policy': $('#Policy').val(),
'signature': $('#Signature').val()
},
// optional, but better be specified directly
//file_data_name: 'file',
// re-use widget (not related to S3, but to Plupload UI Widget)
//multiple_queues: true,
// Resize images on clientside if we can
//resize: { width: 320, height: 240, quality: 90 },
// Specify what files to browse for
filters: [
// { title: "Video files", extensions: "mp4,m4v,wmv,avi,mov,mpg,mpeg,mkv" }
{ title: "Image files", extensions: "jpg,gif,png" },
//{ title: "Zip files", extensions: "zip" }
],
// Flash settings
flash_swf_url: 'Scripts/plupload/plupload.flash.swf',
// Silverlight settings
silverlight_xap_url: 'Scripts/plupload/plupload.silverlight.xap'
});
});
</script>
}
どんな助けでも大歓迎です
編集:わかりました。さらに調査を行いました。
localhost/home は機能するようですが、localhost/home/ と localhost/home/index は機能しません。
最初の css ファイルに @Import *.css がたくさんあることに気付き、それらを /path/to/file.css に変更しましたが、違いはありません。また、@imports から最初のスラッシュを削除しようとしましたが、すべてのスタイリングが削除されただけなので、そうではないことがわかります。
また、.swf パスを絶対パス (localhost:2668/Scripts/plupload/plupload.flash.swf) に変更しようとしましたが、これも機能しませんでした。