YUI 上传器 2.6.0 示例

发布于 2024-07-08 09:39:19 字数 766 浏览 5 评论 0原文

我试图简单地使用一些有关 YUI-Uploader 的示例和说明,但我对许多问题感到沮丧。

  1. “YUI Library: Uploader”备忘单的简单用例对我来说不起作用,因为除了 addListener() 之外列出的所有方法都不存在于 myUploader 对象上。
  2. 示例适用于版本 2.5.1,并包含一个方法称为 browse(),它不仅在 2.6.0 版本中被删除,而且我找不到任何有关如何使用 2.5.1 版本(如果我选择)的文档。
  3. 我找不到 uploader.swf 文件的源 FLA,因此理论上可以诊断所有这些问题。

有没有人成功使用了 2.6.0 YUI Uploader,如果是的话,是否有一些我应该避免的常见干扰 JavaScript,或者可以遵循的更好的示例? 谢谢。

感谢您的回复。

我可能会注意到,在收到对此的任何回复之前,我已经完成了“上传器”项目。 我的问题部分是由于某些示例适用于 v2.5.1,另一部分是由于没有使用事件侦听器来查看组件何时准备就绪。 我从剖析 Flickr 所做的事情中得到了最多的帮助。

I'm trying to simply use some of the examples and instructions regarding the YUI-Uploader, and I'm being frustrated by a number of issues.

  1. The "YUI Library: Uploader" cheat sheet's simple use case doesn't work for me because all the listed methods except addListener() do not exist on the myUploader object.
  2. The example is for version 2.5.1 and includes a method called browse(), which not only was removed in version 2.6.0 but I cannot find any documentation for how to use the 2.5.1 version if I so choose.
  3. I can't find the source FLA to the uploader.swf file so that I could theoretically diagnose all these issues.

Has anyone successfully used the 2.6.0 YUI Uploader, and if so is there some common interfering JavaScript I should avoid, or a better example to follow? Thank you.

Thanks for the replies.

I might note that I finished my "uploader" project before receiving any responses to this.
Part of my problems were due to some of the examples being for v2.5.1 and another part were due to not using an event listener to see when the component was ready. I got the most help from just dissecting what Flickr did.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

孤独患者 2024-07-15 09:39:19

您可以找到 uploader.swf 的源代码 现在,YUI 源代码已在 GitHub 上提供,位于 Uploader.as

You can find the source to uploader.swf here at Uploader.as now that the YUI source is available on GitHub.

故人如初 2024-07-15 09:39:19

对于这个简单的例子,您的链接是错误的,这是正确的链接。

YUI Uploader 简单示例

您也可以看一下如果您愿意的话,在我的实现中,它非常简单,并且使用 YUI 2.6.0 可以正常工作。

Tivac.com YUI 上传器实现

听起来#1 是您尝试调用上传器上的方法立即地。 您应该为它可以触发的所有事件添加侦听器,并在“contentReady”事件触发后进行任何配置。 所有 YUI 示例 & 我的就是这么做的,所以你可以在那里查看代码示例。

You've got the wrong link for the simple example, here's the correct one.

YUI Uploader Simple Example

You could also take a look at my implementation if you'd like, it's pretty barebones and works fine using YUI 2.6.0.

Tivac.com YUI Uploader Implementation

It sounds like for #1 that you're trying to call methods on the uploader immediately. You should instead add listeners for all the events it can fire and do any configuration once the "contentReady" event fires. All the YUI examples & mine do that, so you can check there for a code sample.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文