大风上传文件问题
我正在编写一个将位于Adobe Marketplace中的Blazor Server应用程序,
我想通过应用程序上传文件并将其
拨打用于上传文件的标准代码时将其放在服务器上,我会得到以下例外
'''
FileStream fs = File.Create(path);
await file.OpenReadStream().CopyToAsync(fs);
fs.Close();
' ''
错误
“阅读远程流时发生 我可以在服务器上创建一个占位符,但是
如果我在Adobe之外运行该应用程序,则无法将流添加到IVE创建的路径中,它可以上传,
我找不到与此错误有关的任何内容,还有其他方法可以上传文件吗?
I'm writing a blazor server app that will sit in the adobe marketplace
I want to upload a file through the app and place it on a server
When I call the standard code for uploading a file , I get the following exception
'''
FileStream fs = File.Create(path);
await file.OpenReadStream().CopyToAsync(fs);
fs.Close();
'''
"An error occurred while reading the remote stream: TypeError: r.arrayBuffer is not a function"
I iBrowserFile onjetc has data and I can create a buffer with the correct bytes
I can create a placeholder on the server but cannot add the stream to the path Ive created
if I run the app outside of adobe , it uploads just fine
I cant find anything related to this error , is there any other way to upload a file ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能无法完全回答您的问题,而是相关的 github 问题表明了一个低RAM问题。就我而言,这个问题存在于较旧的iPad上,但是较新的iPad没有这个问题。由于这是通过SignalR发生的,因此很可能缺乏用于处理文件的浏览器支持。
我唯一能找到的解决方案是不支持引起这一点的旧版本的iOS。
This may not fully answer your question, but a related GitHub issue indicates a low RAM issue. In my case, this issue was present on older iPads but newer iPads did not have this issue. As this happens over SignalR, this is most likely lack of browser support for handling the file.
My only solution I could find was to not support the old version of iOS that is causing this.