首页 \ 问答 \ Rest API中的Sharepoint GetListsOfType(Sharepoint GetListsOfType in Rest API)

Rest API中的Sharepoint GetListsOfType(Sharepoint GetListsOfType in Rest API)

无论如何,使用REST API获得类似的GetListsOfType结果。 我试图只使用REST API获取文档库的列表。 与C#中的此代码类似;

 SPListCollection docs = web1.GetListsOfType(SPBaseType.DocumentLibrary);

或者,无论如何还要从REST API中以XML格式从检索到的列表中找到列表类型(例如DocumentLibrary)?


Is there anyway to have similar results of GetListsOfType with REST API. I am trying to get only lists for document library with REST API. Similar to this code in C#;

 SPListCollection docs = web1.GetListsOfType(SPBaseType.DocumentLibrary);

Or alternatively is there anyway to find a list type (for example DocumentLibrary) from retrieved list from REST API in XML format?


原文:https://stackoverflow.com/questions/37735889
更新时间:2022-07-05 06:07

最满意答案

再次回来。 这不能在技术上解释为答案,而只是一个不同的逻辑来完成我发布的这个任务,所以我可以有把握地说这可以是答案(软):)。 我所做的不是在写入文件时读取文件,而是使用'run in background'选项启动ffmpeg shell exec命令并读取文件AFTER ffmpeg转换文件后,结果对于4MB等小文件是准确的但是当我开始转换和读取超过30MB的文件时,我立即遇到了另一个问题。 经过一些深入的研究,我知道当我使用ffmpeg转换30MB或更高的文件时发生的事情是在转换之后,php脚本没有将其控制权交还给JAVA applet以便它读取流,所以我做的是我在ffmpeg完成转换并保存文件之后插入了一个简单的'http_response_code(200)',并且它有效。 对于这里的参考是我在PHP中做的:

http_response_code(200);  
$file = 'D:\\'.$destination;
$fp = fopen($file, 'r');
//ob_end_clean();  
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream'); 
//header("Cache-control: private");
//header('Pragma: private');
//header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header('Content-Length: ' . filesize($file));

$buffer = 1024*8;
while(!feof($fp)) {

echo fread($fp, $buffer);
ob_flush();
flush();



}
fclose($fp);
exit();

希望它可以帮助任何陷入类似问题的人。

关心Haris Tasawar。


Back again. This can not be technically interpreted as an answer but merely a different logic to accomplish this task i posted so i can safely say that this can be the answer(soft of) :) . What i did was instead of reading the file while it is being written upon, i started the ffmpeg shell exec command with the 'run in background' option and read the file AFTER ffmpeg converted the file, the results were accurate for small files like 4MB but i instantly ran into another problem when i started converting and reading files more than 30MB . After some in depth research i got to know that when i was converting a 30MB or above file using ffmpeg what happened was after the conversion, the php script was not giving back its control to JAVA applet in order for it to read the stream, so what i did was that i inserted a simple 'http_response_code(200)' after ffmpeg finished converting and saving the file and voila it works. For references here is what i did in PHP:

http_response_code(200);  
$file = 'D:\\'.$destination;
$fp = fopen($file, 'r');
//ob_end_clean();  
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream'); 
//header("Cache-control: private");
//header('Pragma: private');
//header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header('Content-Length: ' . filesize($file));

$buffer = 1024*8;
while(!feof($fp)) {

echo fread($fp, $buffer);
ob_flush();
flush();



}
fclose($fp);
exit();

Hope it helps anyone who is stuck in a similar problem.

Regards Haris Tasawar.

相关问答

更多
  • 我在过去的3天里一直在努力,并且已经走到了尽头 现在帧成功地是BitBlt到DC,但它们是颠倒的 如果代码有任何问题,请告诉我 avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24, pCodecCtx->width, pCodecCtx->height); int w = pCodecCtx->width; int h = pCodecCtx->height; img_convert_ctx = sws_ ...
  • 不要使用它。 当ffmpeg能够以比实时更快的速度处理源时,它对于实时输出很有用。 在那种情况下,ffmpeg可以以更快的速率发送输出,并且接收器可能无法或不想缓冲和排队其输入。 Don't use it. It's useful for real-time output when ffmpeg is able to process a source at a speed faster than real-time. In that scenario, ffmpeg may send output at t ...
  • 再次回来。 这不能在技术上解释为答案,而只是一个不同的逻辑来完成我发布的这个任务,所以我可以有把握地说这可以是答案(软):)。 我所做的不是在写入文件时读取文件,而是使用'run in background'选项启动ffmpeg shell exec命令并读取文件AFTER ffmpeg转换文件后,结果对于4MB等小文件是准确的但是当我开始转换和读取超过30MB的文件时,我立即遇到了另一个问题。 经过一些深入的研究,我知道当我使用ffmpeg转换30MB或更高的文件时发生的事情是在转换之后,php脚本没有将 ...
  • 这只是进度报告。 每次刷新报告时,如果新帧尚未编码,它将显示相同的数字。 1.0的fps速度意味着每秒编码1帧。 所以,如果一秒钟内进度报告有两次刷新,第二个将显示相同的帧数。 That's just the progress report. Each time it refreshes the report, if a new frame hasn't been encoded yet, it will display the same figure. A fps speed of 1.0 means 1 ...
  • 这是由ffmpeg的特殊行为引起的常见问题(也发生在ssh )。 引自Bash FAQ 89 几乎完全处理您的案例: 这里发生了什么事? 我们来看第一个例子。 read从标准输入(FD 0)读取一行,将其放入file参数,然后执行ffmpeg。 与从BASH执行的任何程序一样,ffmpeg继承标准输入 ,由于某种原因它会读取。 我不知道为什么。 但无论如何,当ffmpeg读取stdin时, 它会吸收find命令的所有输入,使循环挨饿 。 TL; DR: 有两个主要选择: 在ffmpeg行的末尾添加
  • 您运行脚本的用户是否有权限打开该文件? 请使用ls -l /var/www/flashvideo/p1.avi检查 Does the user you run the script as have permission to open the file? Check with ls -l /var/www/flashvideo/p1.avi
  • reload的drawtext文档声明: 确保以原子方式更新文件,或者可能会部分读取文件,甚至失败。 例如,在Linux中,每次更新源文件后都要使用mv覆盖artist.txt 。 The drawtext documentation for reload states: Be sure to update the file atomically, or it may be read partially, or even fail. For example in Linux, after each upda ...
  • 解决方案是创建AVCodecContext的副本,该副本在文件打开时自动创建,并在avcodec_open2使用此副本。 这允许使用avcodec_free_context删除此副本。 使用最新版本的FFmpeg , avcodec_copy_context已被弃用并替换为AVCodecParameters 。 使用问题示例程序中的以下片段插入泄漏: AVCodecParameters *param = avcodec_parameters_alloc(); AVCodecContext *codecCtx ...
  • 你的论点: -f s16le -ar 48000 -ac 1 pipe:1 这些是我用来转换mp3的参数: -acodec libmp3lame -ar 48000 -ac 2 -map 0:a:0? 我相信-ac 1是单声道, -ac 2是立体声 https://trac.ffmpeg.org/wiki/AudioChannelManipulation#monostereo 当我使用带有-f s16le的args转换mp3时,文件出现了损坏和静音。 如果你排除它,我认为它仍然会自动转换为16位。 你也 ...
  • 你打电话的时候 xmlDoc.Save(filePath) 你传递文件名,所以XmlDocument不使用你打开写入的fs流。 相反,它会在内部打开另一个流,这当然会失败,因为您已经打开了一个用于写入的流。 相反,寻找流的开头然后调用 xmlDoc.Save(fs); 您也可以在保存之前将流长度设置为零(截断旧内容),但不完全确定是否必要。 When you call xmlDoc.Save(filePath) you pass filename, so XmlDocument does not us ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。