1

I have a form which creates a project management site for user, user wants to uploads a document by uploading it to project management new site form.

What can i do to upload a document to a site not created yet but will be created soon using asynch event.

My problem is I doesnot know where to keep document until my asynch code creates site and come back to get the document, should I create a temporary library on root web, or store it in sql blob cache or on local network disk space.

1
  • What are you using to develop this?
    – Brandon C.
    Commented Jun 17, 2014 at 8:34

1 Answer 1

1

You can upload a document to a site which is not yet created. You can use SPWebEventReceiver.WebProvisioned event to upload your document as this is Synchronous After event that fires after a subsite is fully provisioned and the provisioning process has stopped, but does not fire when the root web site of a new site collection is created.

http://sharepointtrac.wordpress.com/2013/11/27/site-provisioning-with-an-attached-event-receiver/

5
  • Thank You But Where the document will be stored Commented Jun 17, 2014 at 8:43
  • You can use your local drive or shared location and after uploading you can delete that.
    – Aanchal
    Commented Jun 17, 2014 at 8:47
  • SQL blob cache is also a good option.
    – Aanchal
    Commented Jun 17, 2014 at 8:47
  • can you also give me reason why one option is good then other as thats i am asking Commented Jun 17, 2014 at 8:49
  • You can use a shared location to store the document as it would be easier for you to retrieve document from that location. Other you need to write extra code for making connection etc.
    – Aanchal
    Commented Jun 17, 2014 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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