Tag Info

Hot answers tagged

8

What you are doing is something like this: ItemUpdating (attachItem.Update()) [internal]SPListItem.Update() Which causes the internal Update to fail because you have already done it. Try putting your code in ItemUpdated, rather than ItemUpdating. The flow is then ItemUpdating [internal]SPListItem.Update() ItemUpdated (attachItem.Update())


5

Got it worked !! Used an anchor control with Image instead of Image Button!! <a href="" runat="server" id="aAttachmentURL11" target="_blank"> <img src="~/_layouts/images/ipw/PowerPoint-64.png" alt="" style="border: 0px" width="63px" /> </a> Code : And then called the method getlist(string Title) to return the ...


4

You can construct the attachment URL by using the SPAttachmentCollection.UrlPrefix property of the attachments collection. For example: string attachmentUrl = item.Attachments.UrlPrefix + item.Attachments[0];


4

I had the same problem before. The thing is that sharepoint creates the folder when you add your first attachment, not on creating the item. In other words, the folder you are trying to upload to does not exist. You can create this folder by either adding a dummy-file and removing it in an ItemAdding EventReceiver when you create the item. Another ...


4

I think this forum post on MSDN might be of some help: Add attachment column to copy of NewForm.aspx in sharepoint designer For your scenario, I think you can try to create a custom list form (create custom list form), and then you can use SharePoint control “Form Action Button” instead of the default “Ok” button in the custom list form: ...


3

Okay, so after some debugging I found the problem and, even better, the solution. The OK button on the attach form runs a script called OKAttach(), which features a line towards the end that reads: document.getElementById("idAttachmentsRow").style.display=""; All well and good, except that at some point SharePoint sneaked behind your back and did this to ...


3

You can use DisableAttachments="TRUE" on the top of Schema.xml and you should be good to go: For e.g. <List Title="Test List" Description="Test desc" Direction="0" BaseType="0" Url="Lists/TestList" DisableAttachments="TRUE" FolderCreation="FALSE" Version="8" Type="100" xmlns="http://schemas.microsoft.com/sharepoint/">


3

I know this is an old thread, but there are free codeplex solutions that will do what you are asking. http://SharePointStuff.Codeplex.com adds a new activity to SharePoint Designer that allows you to send an email with an attachment. If used on a list item it will send any documents attached to the item or if used on a document library it will send the ...


3

Just a side note. <httpRuntime maxRequestLength="" /> does not work for IIS 7. It has a new setting under system.webServer. See this blog for a reference: http://weblogs.asp.net/jeffwids/archive/2009/09/24/from-iis6-maxrequestlength-to-iis7-maxallowedcontentlengthfile-specifying-maximum-file-upload-size.aspx


3

If you don't want to go down the document set approach, you could create a lookup column to either a Supporting Files document library or the current document library itself that allows for multiple selections. This would allow you to add additional related documents to the metadata for the "Main" document.


2

Maybe you can consider alternative approach for your solution. You can add additional library designated for storing exe files. Then you can establish link between list and library by using additional url field on list to store direct link to exe in library (if you only have one-to-one relations) or you can use lookup field in library to establish ...


2

I had a glance in the AttachmentsField.UpdateFieldValueInItem call to see where it gets the list of files from for its own use. It appears to use this property: AttachmentsField.Context.Request.Files, the documentation for which is here: HttpRequest.Files Edit: I suddenly realised that you may be trying to access the control in order to save the ...


2

Looking at a custom EditForm.aspx page in Sharepoint Designer, the form code looks like this: <tr id="idAttachmentsRow"> <td nowrap="true" valign="top" class="ms-formlabel" width="20%"> <SharePoint:FieldLabel ControlMode="Edit" FieldName="Attachments" runat="server"/> </td> <td valign="top" class="ms-formbody" width="80%"> ...


2

Assuming you're working in server side code: Take a look a the Attachments property of the SPListItem, it returns an SPAttachmentCollection, from there itterate the SPFiles and use the Url property to get the site relative path and you should be sorted from there. Some times the docs on MSDN are actually quite helpful :)


2

By reading your question, I would solve your problem by creating one document library. Name it for example "Attachements". Then add multiple lookup columns in the first list to this new created "Attachements" document library. Important is to set "Select multiple values" Then the users just needs to add the files to the document library and then create/edit ...


2

You would need to mail-enable to the list so that it was able to receive email. You will then make sure that AD is able to recognize that list's email address as a valid mail recipient. Then add that email address as a recipient of jithu@abc.com. I am not sure about handling the attachment though. http://technet.microsoft.com/en-us/library/cc262947.aspx


2

No, it is not possible - you will have to store (add/remove) the attachements in a different document library. You'll have to do the adding/removing yourself - either with custom code (in your InfoPath Form or better in a custom WebService) or OOTB WebServices. Here is a good article about the Top 10 Questions about InfoPath File Attachements. See Point ...


2

Well, this is not the answer but also a little heavy for a comment... Don't want to change your requirement? If to upload files to sharepoint library then it also has hard limit (2 GB) and by default 50 MB which can be changed from Sharepoint side The problem is that Sharepoint stores them in content MSSQL database under the hood. I do not beleive that it ...


2

This cannot be done out of the box. But there is a solution on Codeplex that adds a custom workflow activity. This activity allows you to attach files that are either attachments in a list or documents in a library. http://sharepointstuff.codeplex.com/


2

REST (with jQuery.ajax): $.ajax({ url: "/_api/lists/getByTitle('Test')/getItemById(1)/AttachmentFiles/getByFileName('test.txt')", method: 'DELETE', headers: { 'X-RequestDigest': $('#__REQUESTDIGEST').val() } }); You can see the REST API endpoints at http://msdn.microsoft.com/en-us/library/office/jj860569(v=office.15).aspx . And you can see ...


1

I think it will be stored as a Base64 encoded string inside the XML file. I would suggest writing a custom .aspx page which takes a querystring parameter to identify the document that can retrieve the raw XML and convert the Base64 encoded attachment into binary and send it back to the browser.


1

You can try this powershell script and run it on the web front end / application server $defaultOpenBehaviorFeatureId = $(Get-SPFeature -limit all | where {$_.displayname -eq "OpenInClient"}).Id Get-SPSite -limit ALL |foreach{ Enable-SPFeature $defaultOpenBehaviorFeatureId -url $_.URL } Or save it as disableopeninbrowser.ps1 and run it through command ...


1

I have found a way to export attachments from Microsoft Office Sharepoint Designer 2007. Once connected to my list, right-click and select "Publish Selected Files...". From there I chose the "File System" option. This writes all my attachments to disk within individual folders id'ed by list item ids. As for the lists themselves, those I just exported to ...


1

This should get you where you need to go: ExecuteOrDelayUntilScriptLoaded(getWebProperties, "SP.js"); var attachmentFiles; function getWebProperties() { var itemId=2; var ctx = new SP.ClientContext.get_current(); var web = ctx.get_web(); var attachmentFolder=web.getFolderByServerRelativeUrl('Lists/City/Attachments/'+itemId); ...


1

It's easy to make. You only need to use input html element to hold file path in user's machive. Sorry, I can't check it now, but so I remember, it isn't necessary to name input starts with "fileupload", but you need only set attribute "type" of input to value "file". SharePoint List Attachment Technical Brief


1

Would using document sets be out of the question? You could create one that had all the properties of a meeting, and under that upload the needed files. It gets all of the grouping and metadata sharing that you would with a single listitem for everything. See: http://sharepoint.microsoft.com/Blogs/GetThePoint/Lists/Posts/Post.aspx?ID=462


1

You know that's going to be hard to do for a number of reasons. 1. The add attachment is just a hidden div activated with JavaScript. 2. a hidden input field stores the selected file paths until you save 3. The update method in the save button gathers those uploaded files and creates attachment entries. For a list form. To accomplish the same thing for ...


1

Are you doing this in code (C#/VB)? If so, I don't think you can send an email to a SharePoint Group, but you will be able to enumerate that group, get all the users' email address from it, and send an email to each in turn. If you're doing this with a workflow, I'm not entirely certain - only way is to try and see what happens (create a SharePoint ...


1

This may not be an ideal answer; but since surveys are not easily customizable, and a custom list doesn't behave exactly like a survey, you might try this: Create your survey. Create a document library for user documents, and filter the library to only show the user their own documents. Instruct the users to upload their docs to the library after ...


1

There is a known issue with Sharepoint and spaces in file names. Spaces become %20. Files with spaces are 250 characters or longer and eventually your sharepoint site will fill up and become unusable. You need to ensure that file names do not contain spaces, ie replace with underscores or dashes or run the name together removing all spaces.



Only top voted, non community-wiki answers of a minimum length are eligible