Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am trying to add an attachment to new item but I could only succeded to upload the attachment into the list's folder (not to list's attachment folder).

How can I achieve uploading the attachment on creating new item process?

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

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 alternative is to create the folder from SL COM. Just make sure that it has the item-id as folder-name and put it under attachments. Hope this will help you :)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.