检查文件更改的后台服务
我还没有做过任何此类编码,并且希望获得一些如何开始的指导。该服务最终会做几件事,也许有人已经想到它会发生。
总体情况是这样的:检测服务器上的 PowerPoint 演示文稿是否已更新。如果它已提取幻灯片并将其另存为单独的 jpeg,则将它们上传到 SharePoint 中的特定图像列表。所有这一切都必须在没有人为干预的情况下发生。
我认为这将是一个窗口服务项目,对吧?那么文件流属性具有处理文件中更改的某些属性?
至于剖析 .pptx/.ppsx 文件并转换幻灯片,是否有“api”或某些 dll 类?
自动将文件上传到 SharePoint 上的库列表怎么样?
谢谢,
里绍
I haven't done any coding of this kind and would like some pointers how to start. The service will eventually do several things and perhaps someone has already thought of it made it happen.
The big picture is this: Detect if a PowerPoint presentation has been updated on the server. If it has extract the slides and save them as individual jpegs then upload them to a specific image list in SharePoint. All this has to happen without human intervention.
I assume this would be a window service project, right? Then a file stream property that with some property that deals with changes in the file?
As far as dissecting a .pptx/.ppsx files and get the slides converted, it there a "api" or some dll class?
What about uploading files to a library list on SharePoint automatically?
Thanks,
Risho
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我已经在 Topshelf http://topshelf-project.com/(一个 .网。
https://github.com/Topshelf/Topshelf/blob /master/src/Topshelf/FileSystem/FileSystemEventProducer.cs
由于如果事件花费太长时间,Windows 就会出现事件泵问题,因此我们还在此基础上实现了轮询,因为
FileSystemWatcher
在此期间会断开连接。https://github.com/Topshelf/Topshelf/blob /master/src/Topshelf/FileSystem/PollingFileSystemEventProducer.cs
现在,这些生产者应该与参与者联系在一起,所以对于它们来说,它们可能看起来有点过于复杂只是检查文件系统事件。该模型是否有用或只是核心部分取决于使用。请记住,即使文件已锁定或尚未完成,您也经常可以收到事件,因此请处理这些异常。
I've done this in Topshelf http://topshelf-project.com/, a windows service host for .NET.
https://github.com/Topshelf/Topshelf/blob/master/src/Topshelf/FileSystem/FileSystemEventProducer.cs
Since Windows has an event pump issue if events take too long, we also implemented polling on top of this since the
FileSystemWatcher
gets disconnected during those times.https://github.com/Topshelf/Topshelf/blob/master/src/Topshelf/FileSystem/PollingFileSystemEventProducer.cs
Now, these producers are supposed to be tied to actors so they might seem a bit overly complicated for just checking on file system events. It's up to use if that model is useful or just the core part. Remember that you can often receive events even if the file is locked or not done yet, so handle those exceptions.
SharePoint 提供了针对此类情况的计时器服务。 Andrew Connell 有一篇关于创建自己的计时器作业的文章。
http://www.andrewconnell.com/blog/archive/2007 /01/10/5704.aspx
SharePoint has what is called a timer service for just these types of situations. Andrew Connell has an article regarding creating your own timer jobs.
http://www.andrewconnell.com/blog/archive/2007/01/10/5704.aspx