SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
  1. Can I upload an image to a document library using javascript?
  2. Can I use that information together with, for example, clipboardData?

The solution does not have to be cross-browser (it's enough if it only works in Chrome, for example)

What I'm aiming at is that a content manager could paste a screenshot to a SharePoint wiki page using CTRL+V, javascript would notice the event, show a dialog asking for the file name, and when user has entered the filename read the file from clipboard, upload it to the default document library (specified somewhere) and create an img tag pointing to the file. From now on the user could interact with the image using oob SharePoint. An example of pasting a screenshot to a html page using Chrome is here: (just paste a screenshot to that page).

Would there be some problems preventing this? (like, do SharePoint file upload APIs support the file formats clipboardData provides, or would there be some other showstoppers?)

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.