uploads: fix batch upload page to work without bookmarklet.
* Add a form to the /uploads/batch page so that it can be used without the bookmarklet. * Fix an exception when no url is given.
This commit is contained in:
@@ -20,9 +20,15 @@ class UploadsController < ApplicationController
|
||||
end
|
||||
|
||||
def batch
|
||||
@source = Sources::Site.new(params[:url], :referer_url => params[:ref])
|
||||
@source.get
|
||||
@urls = @source.image_urls
|
||||
@url = params.dig(:batch, :url) || params[:url]
|
||||
@source = nil
|
||||
|
||||
if @url
|
||||
@source = Sources::Site.new(@url, :referer_url => params[:ref])
|
||||
@source.get
|
||||
end
|
||||
|
||||
respond_with(@source)
|
||||
end
|
||||
|
||||
def image_proxy
|
||||
|
||||
Reference in New Issue
Block a user