问题标签 [knox-amazon-s3-client]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
9913 浏览

node.js - 使用 nodejs、expressjs 和 knox 显示来自 amazon s3 的图像

我认为这应该是一件直截了当的事情,但我无法找到解决方案:s

我试图找出在网站上显示存储在亚马逊 S3 上的图像的最佳方式。

目前我正试图让它工作(不成功)

是不是可以直接从亚马逊显示图像?我的意思是,减轻服务器负载的解决方案将是最好的。

0 投票
1 回答
1288 浏览

node.js - 将录制的音频发送到 S3

我正在使用RecorderJs录制音频。完成后;我想通过服务器将它保存到 amazon S3(我正在使用 knox 库)(因为我不想共享密钥)。

在服务器端,使用 knox ...

这仅节省了 2 个字节!

还; 这是节省服务器内存的最佳方法吗?还是有更好的选择?

我也看到了这个:Recorder.forceDownload(blob[, filename])

我应该强制下载然后将其发送到服务器吗?

或者我应该直接从我的域保存到 S3。S3 中是否有其他用户尝试在我的服务器上存储数据时无法破解的选项?

0 投票
1 回答
1440 浏览

node.js - How do I stream a file from NodeJS to Amazon S3, using Knox?

I'm very new to streams in NodeJS - basically clueless about them - and I'm trying to get the KnoxJS client for Amazon S3 to stream a file from an HTTP GET.

The sample code on the Knox github page shows this:

But this is very clearly incomplete... it really doesn't do much of anything other than open the http.get and putStream for S3.

So where do I go from here? Can someone help me complete this code so that I can stream a file from an HTTP GET to my bucket on S3?

0 投票
2 回答
5235 浏览

angularjs - Streaming file to S3 "Error: stream ended unexpectedly"

Update:

I believe that this could be caused by the fact that I'm using the body parser provided by express. Could this be messing with the stream that multiparty is trying to parse?

I'm basing my solution on this answer.

What I'm trying to do: Stream a file from a client browser straight to S3 with my NodeJS server acting as a proxy (for security purposes). I don't want the file to touch the server's filesystem to avoid that bottleneck.

I'm getting the following error:

#xA;

I've looked at the code and can't quite seem to understand what's causing the issue. I'm using angular-file-upload because I'm using angular on the front end. Here's what the request looks like:

#xA;

And here's what my code looks like:

#xA;

It looks like the part that is blowing up is multiparty and I've looked into that code a little bit to no avail. I'm not certain if I'm making the request incorrectly or if there's something wrong with my server code. I don't think it has anything to do with my S3 bucket, but I suppose it could be that as well.

Anyway, any tips are welcome.

0 投票
1 回答
781 浏览

node.js - 使用 knox/node.js 直通下载 S3 文件作为附件

我正在尝试通过 node/knox 工作从 S3 下载文件。我的 javascript 调用正在运行并成功下载文件,但我想将其作为附件下载。我尝试将标题设置为'Content-disposition': 'attachment; filename=myfile.zip',但它似乎不起作用。这是我的示例代码:

我也尝试在 knox 调用上设置这些标题,但仍然不会作为附件下载。

0 投票
1 回答
483 浏览

hadoop - http 045:使用 knox gateway-0.3.0 将数据加载到 hadoop 集群时方法不允许错误

我正在尝试列出 hadoop 集群中存在的数据,并使用 curl 命令复制数据,但我收到 http 405 错误。下面是我正在使用的命令。

0 投票
2 回答
717 浏览

node.js - 如何将目录中的所有文件上传到s3

我正在编写节点 js 脚本,它应该将图像从目录发送'/images/'亚马逊 s3。我知道knox是一个非常好的库,但是如何使用旧文件名从目录上传所有文件。我可能可以使用fs模块,获取所有名称并for循环上传。诺克斯有什么功能可以做到这一点吗?

0 投票
1 回答
2180 浏览

apache - Apache Knox Gateway 是否与 Cloudera 4.5 兼容?

我目前正在开发一个带有 Hadoop 集群的未来项目。我需要查找有关集群安全性的信息。

我找到了似乎是我们需要的 API Apache Knox Gateway。我们现在使用 Cloudera 4.5。未来,我们将升级到 Cloudera 5。

我的问题是 Knox 似乎与 Cloudera 4.5 不兼容(http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH4/latest/CDH-Version-and-Packaging-Information/cdhvd_topic_3。 html ).

http://knox.apache.org/books/knox-0-4-0/knox-0-4-0.html#Quick+Start

根据该网站,这是唯一经过测试的版本。有人对此 API 和 Cloudera 4.5 有经验吗?

如果它不能工作,是否有任何解决方案可以确保集群安全?

0 投票
1 回答
1395 浏览

node.js - 连接到 AWS S3 时 Node.js 崩溃

将我的应用程序从 IntoVPS 迁移到 Digital Ocean 后,我的应用程序在尝试将照片上传到 AWS S3 时崩溃。

服务器之间的区别是:IntoVPS 运行的是 Ubuntu 10.10,而 Digital Ocean 运行的是 Debian;IntoVPS 有节点 0.8.x,Digital Ocean 有 0.10.26。

新服务器上没有可能导致此问题的防火墙(我已经检查过)。

崩溃错误是:

其中一些可能与永远试图重新启动进程有关(我认为这就是 spawn 的含义)。我要关注的是 ECONNRESET 之一。

所以,我正在使用永远运行我的进程,并且我正在使用 knox 模块连接到 S3。

谷歌搜索后我发现:https ://github.com/LearnBoost/knox/issues/198

我尝试添加它在中所说res.resume()的回调,但没有任何变化;putFile我仍然收到 ECONNRESET 错误。

我花了一整天(昨天)试图解决这个问题,但我不能继续让我的生产应用程序被破坏,所以我决定尝试切换到旧版本的 Node 以暂时(但快速)修复这个问题。因此,我安装了 n 模块以尝试获取 0.8.26 作为安装的节点版本。不幸的是,n 没有用,这是我创建的问题:https ://github.com/visionmedia/n/issues/170

编辑:

退出我的 ssh 会话并打开一个新会话后,n 正在工作。但是,切换到 0.8.26 版本的节点会导致另一个错误:

正如你所看到的,我正在尝试用 S3 解决这个问题,而且我快哭了(隐喻地)。我不能一直在这个问题上浪费时间,但我似乎无法解决它。几乎就像 Node 本身坏了一样。

任何人都可以提供有关发生了什么的任何见解吗?对此的任何帮助表示赞赏。

为什么诺克斯不再工作了?

编辑

这里有更多细节。

错误代码:

所有照片无论大小或格式如何都会导致相同的错误。

0 投票
1 回答
701 浏览

internet-explorer - 亚马逊 s3 无法在 IE 中打开 pdf 文件

我将 pdf 上传到 s3 并使用签名的 url。将 amazonHeaders 传递给内容处置(我正在取回内容处置的响应标头)。为此,我在 KNOX 的 client.js 中添加了一个补丁

并传递 options.headers

但我无法在 IE 中打开它,我可以在 chrome 中打开它。

我不知道我是否真的需要 content-disposition 标头。因为当我从本地主机/快递 nodejs server.it 尝试时,它会发送相同的响应。它在 IE 中自动打开。

本地主机

这是来自 Amazon/S3 的响应

在此处输入图像描述