Fix JS and JS-based image upload
This commit is contained in:
parent
36984ff1d4
commit
fa8a7fc77a
6 changed files with 95 additions and 51 deletions
|
|
@ -66,13 +66,8 @@
|
|||
= render(partial: 'details_rightbox', locals: {pkg: @package})
|
||||
|
||||
javascript:
|
||||
import {upload_paste_handler} from 'aplication';
|
||||
|
||||
// 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_json_path}}';
|
||||
let ajax_upload_url = '#{{upload_receive_json_path}}';
|
||||
|
||||
// Where to go to after a successful image upload
|
||||
var after_upload_url = '#{{package_path(@package)}}';
|
||||
let after_upload_url = '#{{package_path(@package)}}';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue