首页 \ 问答 \ 如何在FineUploader Azure请求中包含Content-MD5标头?(How to include Content-MD5 header in FineUploader Azure request?)

如何在FineUploader Azure请求中包含Content-MD5标头?(How to include Content-MD5 header in FineUploader Azure request?)

我想使用Content-MD5标头为Azure提供正在上载的文件的客户端生成的MD5哈希值。 我如何在FineUploader中完成此任务?

目标受众:Firefox,Chrome,Safari,Opera和IE10 +。

这个答案来看,我认为它应该是可能的,但至少有一半的客户将在非常旧的(慢)计算机上运行。 那么客户端MD5哈希方法是否可行?

有些相关的问题:我还认为设置最大文件大小以减少MD5散列算法的压力可能是明智之举。 也许只是在Azure的“分块”限制之下? 从不同的角度来看:我可以禁用分块吗?


I would like to use the Content-MD5 header to supply Azure with a client-side generated MD5 hash of the files being uploaded. How would I accomplish this task in FineUploader?

Target audience: Firefox, Chrome, Safari, Opera and IE10+.

Judging by this answer I gather that it should be possible but at least half of our clients will run on very old (slow) computers. Is it feasible to do this client side MD5 hashing approach then?

Somewhat related side question: I was also thinking that it might be wise to set a maximum file size to reduce strain on the MD5 hashing algorithm. Maybe just below Azure's "chunking" limit? From a different view: Can I disable chunking?


原文:https://stackoverflow.com/questions/29939610
更新时间:2023-02-20 10:02

最满意答案

我足够接近,可以回答我的原始问题。 为此目的,我对ggplot2失去了信心,因为我找不到使用coord_polar绘制多边形的方法。 我发现了另一个符合我需求的包,叫做“plotrix”。 无论如何这里是我使用的数据集的一个例子:

# Wind-Currents data
intensity_measured <- matrix(c(0.20289, 0.14956, 0.24291, 0.35733, 0.59993, 0.89495, 0.71406, 0.38831), nrow=1, ncol=8)
intensity_simulated <- matrix(c(0.17853, 0.07568, 0.52146, 1.94222, 0.08634, 0.02636, 0.04742, 0.04162), nrow=1, ncol=8)
direction_measured <- matrix(c(42.21043, 88.41437, 137.7938, 182.6797, 227.6208, 269.7415, 313.8207, 358.0944), nrow=1, ncol=8)
direction_simulated <- matrix(c(36.13772, 85.17624, 148.96940, 176.66004, 210.36353, 282.38215, 314.35050, 0.72026), nrow=1, ncol=8)

# Library allowing polygon plot on polar coordinates
library(plotrix)

# Function for plotting wind data by date
polar.plot(rbind(intensity_measured, intensity_simulated),
           rbind(direction_measured, direction_simulated),main="My plot",
           rp.type="p", poly.col=c(rgb(255/255, 215/255, 0, .8),
           rgb(0, 0, 1, .8)), start=90, clockwise=TRUE, radial.labels = "",
           label.pos=NULL, line.col=c("black", "black"),
           radial.lim=c(0,max(rbind(intensity_measured, intensity_simulated))),
           boxed.radial=FALSE)

我们到了 :

在此处输入图像描述

这很清楚,所以,现在我可以比较我的测量风和模拟风! 如果有人有个好主意,我仍然对使用ggplot2的解决方案感兴趣;)

感谢Stackoverflow社区,希望这个例子可以帮助你们中的一些人!


I'm close enough to give an answer to my original question I think. I lost my faith in ggplot2 for this purpose, since I couldn't find a way to plot polygons using coord_polar. I discovered an another package fitting my needs, called "plotrix". Anyway here is an example of dataset I used :

# Wind-Currents data
intensity_measured <- matrix(c(0.20289, 0.14956, 0.24291, 0.35733, 0.59993, 0.89495, 0.71406, 0.38831), nrow=1, ncol=8)
intensity_simulated <- matrix(c(0.17853, 0.07568, 0.52146, 1.94222, 0.08634, 0.02636, 0.04742, 0.04162), nrow=1, ncol=8)
direction_measured <- matrix(c(42.21043, 88.41437, 137.7938, 182.6797, 227.6208, 269.7415, 313.8207, 358.0944), nrow=1, ncol=8)
direction_simulated <- matrix(c(36.13772, 85.17624, 148.96940, 176.66004, 210.36353, 282.38215, 314.35050, 0.72026), nrow=1, ncol=8)

# Library allowing polygon plot on polar coordinates
library(plotrix)

# Function for plotting wind data by date
polar.plot(rbind(intensity_measured, intensity_simulated),
           rbind(direction_measured, direction_simulated),main="My plot",
           rp.type="p", poly.col=c(rgb(255/255, 215/255, 0, .8),
           rgb(0, 0, 1, .8)), start=90, clockwise=TRUE, radial.labels = "",
           label.pos=NULL, line.col=c("black", "black"),
           radial.lim=c(0,max(rbind(intensity_measured, intensity_simulated))),
           boxed.radial=FALSE)

Here we are :

enter image description here

This is pretty clear, so, now I can compare my measured and simulated winds ! I'm still interested in a solution using ggplot2 if anyone has a brilliant idea ;)

Thanks to the Stackoverflow community, hope this example can help some of you !

相关问答

更多
  • 你不需要使用PBS(我已经很难了解到这一点,因为@flowla发布的r-sig-geo链接是我最初发布的问题!)。 此代码显示了如何在rgeos中完成所有操作,并感谢来自Roger Bivand的各种不同发布 。 这将是更加规范的子集化方式,而不是强制PolySet对象。 错误消息的原因是您无法在SpatialPolygons的集合上进行交互,因此您需要单独执行它们。 用gIntersects找出你想要的。 然后使用gIntersection每个国家多边形gIntersection 。 我有一个问题,将Sp ...
  • 要在lat-lon坐标中获得多边形的正确面积计算,最好事先使用“spTransform”将它们转换为公制等面积投影。 或者,您可以使用允许的包geosphere “用于地理应用的球面三角法。也就是说,计算角度(经度/纬度)位置的距离和相关度量” 例如,这个: require(geosphere) areaPolygon(mypoly) (mypoly是一个spatialPolygons对象)将以平方公里为单位给出它的面积。 HTH。 To get a correct area computation fo ...
  • 我不知道这是多么好,但也许在polygon之后添加curve curve(dnorm(x), -3, 3, bty="n", ann=F, axes=F, col=NA) xs <- seq(-0.5, 0.5, len=1000) polygon(c(xs[1], xs, xs[1000]), c(0, dnorm(xs), 0), col='grey', border = NA) curve(dnorm(x), -3, 3, col='blue', add = TRUE, n = 1e4) #n = 1 ...
  • 通过转换为geoJSON格式将多边形添加到地图中,如rCharts源代码中的示例10所示: https : //github.com/ramnathv/rCharts/blob/master/inst/libraries/leaflet/examples/example10.R 请注意geoJSON中的xy坐标和setView之间lat和long的差别。 这里的代码给了我一个捷克共和国靠近德国的蓝框。 xy = cbind( c(13.42666, 13.42666, 13.56383, 13.5635 ...
  • 我无法说出为什么你的代码没有产生输出 - 有太多可能的原因 - 但这是你想要实现的吗? 码 library(rgdal) library(ggplot2) library(plyr) library(RColorBrewer) setwd("< directory with all your files >") map <- readOGR(dsn=".",layer="ALRIS_tigcounty") marriages <- read.csv("marriages.2012.csv",h ...
  • 这是我的解决方案。 我尽可能使用sf 。 根据我的经验, sf与raster功能并不完全兼容,所以这里有几个解决方法不是太难看。 我使用的是不同于您提供的基础数据。 基础数据 library(sf) library(raster) library(magrittr) set.seed(1) ## We will create your polygons from points using a voronoi diagram x <- runif(10, 640000, 641000) y <- runi ...
  • 我足够接近,可以回答我的原始问题。 为此目的,我对ggplot2失去了信心,因为我找不到使用coord_polar绘制多边形的方法。 我发现了另一个符合我需求的包,叫做“plotrix”。 无论如何这里是我使用的数据集的一个例子: # Wind-Currents data intensity_measured <- matrix(c(0.20289, 0.14956, 0.24291, 0.35733, 0.59993, 0.89495, 0.71406, 0.38831), nrow=1, ncol=8) ...
  • 如果您致力于使用spatstat包,这可能不会非常有用。 如果没有,请继续阅读...... 如果你想做的只是将多边形绘制为单独的图层,请使用ggplot library(ggplot2) library(sp) library(maptools) setwd("") poly1 <- readShapeSpatial("Polygon_One") poly2 <- readShapeSpatial("Polygon_Two") # pl ...
  • 关注@jbaums评论,我使用了包rgeos中的gDifference: intflv <- gDifference(state,rivers) 但由于“state”只有一个多边形,因此intflv成为一个SpatialPolygons对象,只有一个Polygon,由数千个子多边形组成。 为了更好地在GIS软件中工作,我希望它成为一个包含所有数千个多边形的对象,每个多边形都是一个子多边形。 所以我做了: l <- list() total <- length(intflv@polygons[[1]]@Po ...
  • rgdal对于这种事情非常棒。 http://www.gdal.org/提供了您可能希望获得哪些格式的大部分信息。 在这种情况下,您需要writeOGR函数 # this will create a shapefile called poly within the working directory library(rgdal) writeOGR(poly, dsn = '.', layer = 'poly', driver = "ESRI Shapefile") 您可以轻松地使用它来编写任何形状文件(点 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)