Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.
  1. Can I upload an image to a document library using javascript?
  2. Can I use that information together with, for example, clipboardData?
    http://stackoverflow.com/questions/6333814/how-does-the-paste-image-from-clipboard-functionality-work-in-gmail-and-google-c

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: http://strd6.com/2011/09/html5-javascript-pasting-image-data-in-chrome/ (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
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.