问题标签 [tus]

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 投票
0 回答
1685 浏览

node.js - 使用 Filepond 将块上传到运行 Express 的 NodeJS

我需要使用Filepond将大文件(2GB+)上传到运行 Express 的 NodeJS 服务器。这些文件需要流式传输(因为它们的大小)到两个位置……一个本地文件夹和一个远程文件夹。

我的研究使我找到了使用tus-node-server https://github.com/pqina/filepond/issues/48的解决方案

我已经实现了如下所示的解决方案,但我不知道如何:
1. 在上传时更改文件的名称(它使用 UID,我想使用“元数据”属性中的文件名)
2 . 在上传期间或上传之后在服务器上执行一个函数。

有什么帮助吗?

客户端.js

服务器.js

在尝试此方法之前,我app.post用于接收上传并执行进一步的操作。

0 投票
2 回答
2095 浏览

laravel - 将 Laravel Route::any 转换为 Lumen Route

我正在从https://github.com/ankitpokhrel/tus-php/wiki/Laravel-&-Lumen-Integration设置 tus.io php 服务器

但我被困在转换路线::any from laravel to lumen route

0 投票
0 回答
1478 浏览

javascript - 保护 Asp.NET Core Uppy.js 端点

我在我的 ASP.NET MVC Web 应用程序中使用Uppy.io作为客户端 tus.io 实现。

并且tusdotnet v2.0.0作为 ASP.NET Core Web API 中的服务器端。

它一直运行良好,但我们如何将文件上传限制为仅对经过身份验证的用户?

这是我的 Razor 页面的代码片段:

Startup.cs 的 Configure 方法中来自 .NET Core 项目的代码片段:

一切正常,但我不希望 WebAPI 保存匿名用户发送的文件。

任何解决方案或解决方法将不胜感激。谢谢。

GitHub问题: https ://github.com/tusdotnet/tusdotnet/issues/76

0 投票
3 回答
2930 浏览

python - Could not find a version that satisfies the requirement **tusclient**

Iam getting the following error while trying to do "pip install tusclient".

Could not find a version that satisfies the requirement tusclient . Error: No matching distribution found for tusclient.

0 投票
3 回答
759 浏览

nginx - 在 Nginx 上通过 https 配置 tusd 的问题

我正在尝试在 https 上使用 Uppy 设置 tusd,但没有成功。它在http上运行良好。

这是我的 nginx 配置文件:

在另一个 conf 文件中,我有这个额外的配置:

在 Chrome 控制台我有以下输出:

注意没有 .com 扩展名的域!

我尝试了所有配置组合,但没有成功注释配置行。你能发现错误吗?

0 投票
1 回答
641 浏览

video - Vimeo API:使用可恢复的方法上传视频文件(javascript)

需要帮忙。

我正在使用 TUS 协议在 VIMEO 上上传视频。

我将视频文件分成块(大小:每个 300.000 字节)。

在第一个块之后,我看到他的大小是 300.000 字节;

...

var buf = new Int8Array(evt.target.result); var chunkSizeReal = buf.byteLength; // 300.000 字节
...

在第一次 PATCH 之后,我调用 HEAD 来检查 UploadOffset,我得到:

上传长度:68077489

上传偏移量:2609448

我不明白的是,如果块发送的大小为 300.000 字节,为什么偏移量是 2.609.448。

0 投票
1 回答
220 浏览

reactjs - 错误:拒绝在“tus-js-client”npm 包中获取不安全的标头“Location”

我正在使用这个(https://www.npmjs.com/package/tus-js-client)npm包在我的 react.js 项目中上传文件,对于大多数设备它工作正常,但在某些设备中它显示此包的 upload.js 文件中的 this(Refused to get unsafe header "Location") 错误。我不知道如何解决它。有人可以帮忙吗?

0 投票
1 回答
222 浏览

tus - 不要在 laravel 7 中安装 symfony/console v5.0.5 \ankitpokhrel/tus-php

我正面临don't install symfony/console v5.0.5在 laravel 7 版本中使用版本 ^1.2 for ankitpokhrel/tus-php 的问题。请帮帮我。我不知道如何解决它...

这是我的问题的截图 图片

0 投票
1 回答
601 浏览

reactjs - How to yield inside an external callback function in react redux saga?

I'm using the tus Protocol to upload files and this protocol has some callback functions. What I'm trying to do is to yield an action and do something else, but I see that I can't use yield inside the callback.

Bellow is a piece of code from the saga function that contains the callback.

I read something related to channels, but I couldn't understand it very well, so any help would be appreciated.

0 投票
1 回答
182 浏览

go - 未调用 TUSD 预创建钩子

tusd 中的 pre-create 似乎没有被调用。它是一个名为 pre-create 的简单 sh 脚本,如下所示:

服务器生成的日志显示:

[tusd] 2020/03/21 17:17:20 event="HookInvocationStart" type="pre-create" id="" [tusd] 2020/03/21 17:17:20 event="HookInvocationFinish" type="预创建"id=""

而其他人则显示此日志:

[tusd] 2020/03/21 17:17:20 event="HookInvocationStart" == 开始 POST-CREATE

我确实知道,如果预创建脚本没有执行权限,我会收到指示权限问题的错误。

从命令行执行 ./pre-create 会显示正确的消息。

有任何想法吗?