Quantcast
Channel: Question and Answer » file
Viewing all articles
Browse latest Browse all 103

Can't use all SPFileCollection.Add methods with sand boxed solution?

$
0
0

I’m copying items based on a queue (custom list) and an event receiver which looks at when items are added to that queue, but the method I need to use SPFileCollection.Add(String, Stream) is apparently inaccessible in sand boxed solutions (I get the Method Not Found error and found an interesting note here: http://msdn.microsoft.com/en-us/library/ms414180)

I am using this to get the binary from a previous version of a file (i.e., file in sites/_vti_history/myLibrary), so I cannot use SPFileCollection.Add(String, []) since GetFile("SomePreviousVersionFile.docx") does not work whereas getting the Stream response does.

Is there any possible way to add a file to a document library and use the stream instead of binary with a sand boxed solution?


Viewing all articles
Browse latest Browse all 103

Trending Articles