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.

  • What are you using to develop this? – Brandon C. Jun 17 '14 at 8:34
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/

  • Thank You But Where the document will be stored – Mathematics Jun 17 '14 at 8:43
  • You can use your local drive or shared location and after uploading you can delete that. – Aanchal Jun 17 '14 at 8:47
  • SQL blob cache is also a good option. – Aanchal Jun 17 '14 at 8:47
  • can you also give me reason why one option is good then other as thats i am asking – Mathematics Jun 17 '14 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 Jun 17 '14 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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