Paste Upload

Demo uploads land in a temporary store and are swept after 60 minutes. To keep files, handle FileUploaded — see Single File for the complete save pattern.
Paste Upload

Enable clipboard paste upload with EnablePaste="true". Users can paste images from the clipboard (Ctrl+V / Cmd+V) directly into the upload area. Ideal for screenshots, copied images, and quick image sharing workflows.

What you should see: copy an image and paste it onto the page (Ctrl+V) - it joins the queue like a picked file. Browse works too; images only.
Drag & drop files here, or paste from clipboard
Try it: Copy an image to your clipboard (e.g., take a screenshot with Print Screen), then click in this area and press Ctrl+V to paste and upload it.
<%-- Server control with paste enabled --%>
<au:AjaxFileUpload ID="Uploader1" runat="server"
 EnablePaste="true"
 AutoUpload="true"
 ShowProgress="true"
 AllowedExtensions="jpg,jpeg,png,gif,webp,bmp"
 ButtonText="Browse or Paste (Ctrl+V)" />

<%-- JavaScript API equivalent --%>
AjaxUploader.create(el, {
 uploadUrl: '/ajaxupload.axd/upload',
 paste: true,
 autoUpload: true,
 allowedExtensions: ['jpg','jpeg','png','gif','webp','bmp'],
 onTaskComplete: function (file) {
 statusEl.textContent = 'Pasted/uploaded: ' + file.name;
 }
});

Paste is on by default

The property above is explicit for clarity, but you do not need it: Paste defaults to true, so an uploader accepts Ctrl+V as soon as you drop it on the page. Set Paste="false" to turn it off. EnablePaste is a compatibility alias for the same property.

What actually arrives when a user pastes

Two different things land on the clipboard and both are handled:

  • A screenshot (Print Screen, Win+Shift+S, Cmd+Shift+4) arrives as raw image data with no filename. The uploader names it for you and uploads it like any other file.
  • A copied file from Explorer or the Finder arrives with its real name and type intact.

Restrict what is accepted with AllowedExtensions, exactly as this demo does - a paste that fails the rule is rejected in the browser, before anything is transferred.

Why teams use it

Paste removes the save-then-browse-then-find detour from the workflows where screenshots matter most: bug reports and support tickets, chat-style attachments, and CMS or documentation editors where an author is already copying images. It pairs naturally with drag and drop - together they cover almost every way a user has an image in hand.

Related

  • Image upload - resize, crop and validate before the transfer.
  • Drag and drop - drop zones, full-page drops and folder drops.
  • Learn - how uploads work in Web Forms.