Can't delete list attachment someone has open - attachment

In SharePoint Online, if someone opens a list item attachment even a Site Owner can't remove the attachment. Is there a way to unlock or take control of the document in SharePoint? (I'm not a system admin so I don't think I can run PowerShell commands)

I could reproduce this issue. When I view list attachments in SharePoint Designer, it shows the file is locked. If I delete it, an error message will show, like the below.
You can click "Undo Check Out" for the file then delete it again.
A similar thread for your reference.

Related

Hiding the Inbox from the documents directory for File Sharing

Is it possible to hide the Inbox from the list displayed of the directories?
For example, in this screenshot from a tutorial, the inbox folder features. In my app I would prefer it not to.
Other apps (eg. Molecules) seem to manage this, so I assume it is possible.
(In case anyone is wondering I am a novice developer)
I very much appreciate any help.
So it turns out that although the Inbox directory is not writeable, it is deletable. Files opened through other apps will be automatically placed in this file, and if the inbox does not exist then it is created. So to get rid of it, simply delete it every time you handle an external file opening.
Very simple, just got thrown when I tried to edit a file in the inbox, which raised an exception, making me think the inbox was write-protected.

open an excel file located on the server instead of download it MVC

I'm building a Reporting web application right now with MVC3 and I've come up to a couple problems.
My goal is to have it able to generate and view Crystal Reports, SSRS reports, and Excel documents.
Right now I'm working on the Excel segment and I'm running into more trouble than I thought I would. First off, when I link directly to the file, it either opens inside the browser or it downloads it from the server and if the user makes changes it doesn't actually save it to the true file on the server.
I've tried both linking to the file directly using Razor and a ViewModel with the path to the document as well as directing it to an action that returned a File.
I've also tried linking it to a shortcut to the actual file thinking that if I could open the shortcut it would open the file the way I wanted it to and unfortunately it didn't really open at all.
The users already have access to the files on the server through a network drive, so as of right now they can go into the server, open the excel document, edit and save it no problem. I want to duplicate this effect through a link. The program already has a file browser built, so I can browse between the files and make links to the reports.
Thanks in advance!
Since they are apparently on a network drive, you can just link to the files directly, relative to the user?
For example: a link to file://///SERVERNAME/folder/
I tested it between two computers on the network, and that seems to work. However, you still get a popup asking that you want to do with the file, open or save. (both in firefox and IE)
Note: Yes, that many slashes seem necessary, lol

Capturing folder path from Windows Explorer

I would like to add to a Delphi application a way for the user to call Windows Explorer (possibly using something like ShellExecute, perhaps).
However, and this is where I need some help, please, the application would need to capture ^H^H^H^H^H^H read the folder path that the user navigates to while within Windows Explorer.
Is it possible to obtain this information from Windows Explorer?
[edit: If not possible, or unrealistic, my fallback plan is to provide a separate "Browse for folder" button, to allow the user to select the folder first, then they can launch the Window explorer afterwards].
Thanks for any advice.
PhilW.
I dont know your exact needs, but most likely, this is not the way to go. For details, Microsoft developer Raymond Chen has written a blog post about this. What you should do, I think, is to embed an explorer browser control in a custom form in your own application.
For letting a user browse to and select a folder, I use TOrtusShellBrowseFolder.
Ortus Shell Components
Can't you just use the TOpenDialog? From Delphi Help:
Description
TOpenDialog displays a modal Windows dialog box for selecting and opening files. The dialog does not appear at runtime until it is activated by a call to the Execute method. When the user clicks Open, the dialog closes and the selected file or files are stored in the Files property.
if OpenDialog1.Execute then
filename := OpenDialog1.FileName;

delphi prevent access files from TwebBrowser

I use TEmbeddedWB (internet explorer activex) in my projects.
I want to prevent people from uploading files:
ex: goto gmail.com and then attch a file: Internet explorer opens the upload file windows that allows people to access local disk.
Is there a simple way to prevent this windows from being displayed ?
Regards
It sounds like you are trying to "sandbox" your app so that your users cannot access the local file system. Perhaps you're building an app that is hosted on Citrix with multiple users, and if one of them "breaks out" of the app, they can run rampant through the file system on the server.
I don't know if there is a simple answer to this particular question, but I recommend that you look at the total problem before trying to solve the individual issues, as you may find that there are just too many. For instance, in the browser ActiveX, you can also "view source". That probably opens Notepad on the server. From there, you can run rampant. Do you have CHM help? From the help window, you can also access the "open file" dialog. Do you allow the user to open/save files through your regular menus? Same issue. How about hyperlinks? If your About box has a hyperlink, that's an easy way to pop open a browser. Can the user enter an address for browsing in your embedded ActiveX? If so, can they enter things like: C:\WINDOWS\system32\cmd.exe
You could decouple the navigation, do it yourself, sanitize the HTML then display the sanitized version. Unfortunately you would have to do this for ALL resources and would need to handle the numerous JavaScript libraries. For basic HTML, look for <input type="file". This would at least catch the basic usage, but not the more advanced usage.
A simpler solution might be to limit what URL's the browser can navigate too and only allow URL's you know are safe.
Assuming you don't want them to browse the local machine, if you solve the "open file" problem the same issue exists if you have a "save file" dialog. You may have to close those loops by replacing the browser popup menu with one that does not have any "Save x As..." options.

How to add an image to a TFS work item; as an image, not as an attachment

Our team is in the process of begining a project which is being managed using TFS. Several requiremens which existed only in Word documents are being migrated to TFS work items. The Word documents contain various diagrams and images which we need included in the work item, specifically under the 'Details' and 'Analysis' tabs. The problem is that images cannot be pasted into these tabs as images.
The only option to add images to the work item appears to be as an attachment.
Could someone confirm this?
Any assistance is appreciated.
The below steps worked for our team:
1- I added a *.png file as an attachment
2- Opened that *.png file within IE from the attachments tab
NOTE: Once the image opens in IE the address should be something like
the below:
http://tfs.mysite.com:8080/tfs/defaultcollection/WorkItemTracking/v2.0/AttachFileHandler.ashx?FileID=1234567&FileName=TFS-12345-QA.PNG
If the address has "c:\etc" which is locally stored then it will not
work. The image has to be network accessible so other team members may see it in TFS.
3- Right click the image and select copy
4- Now within TFS under the "History" tab where you're entering your notes paste the image
5- Save the workitem and that is it.
Cheers!
You can change the text boxes to accept HTML, but that may still require the image to be hosted elsewhere.
HowTo: http://msmvps.com/blogs/vstsblog/archive/2009/01/11/using-rich-html-descriptions-instead-of-plain-text.aspx
It may also be best to just link to the existing document. We have to do this for now, because we have a large repository of existing documentation that no-one wants to bother converting.
Using the stock workitem this is true. You can extend the workitem display within the team explorer with your own custom controls that could display an attachment inline, but this won't be a small effort.
There are samples and guidance here
We write our Word documents, save them as filtered HTML and copy file and folder containing the images onto the server hosting the TFS. We then open the html from the server version in a browser and copy/paste requirements into the work items description field. Is a workaround, would be much nicer being able to directly copy/paste images into a workitem, but at least it works.

Resources