Allow Ctrl-V uploads from details and upload view
This commit is contained in:
parent
44a7f31bd4
commit
0f20a53554
3 changed files with 82 additions and 62 deletions
|
|
@ -70,3 +70,13 @@
|
|||
/ Right column contains metadata about the package.
|
||||
/ #metadata is the anchor for this sticky container.
|
||||
= render(partial: 'details_rightbox', locals: {pkg: @package})
|
||||
|
||||
javascript:
|
||||
// Handle Ctrl-V to paste an image directly
|
||||
document.onpaste = upload_paste_handler;
|
||||
|
||||
// Where to send POST requests for uploads
|
||||
var ajax_upload_url = '#{{upload_receive_path(format: :json)}}';
|
||||
|
||||
// Where to go to after a successful image upload
|
||||
var after_upload_url = '#{{package_path(@package)}}';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue