Use the normalized source in the upload form.

This makes it so you can use the bookmarklet to upload from any of these Pixiv pages:

* http://www.pixiv.net/member_illust.php?mode=medium&illust_id=45792845
* http://www.pixiv.net/member_illust.php?mode=big&illust_id=45792845
* http://www.pixiv.net/member_illust.php?mode=manga&illust_id=45792845
* http://www.pixiv.net/member_illust.php?mode=manga_big&illust_id=45792845&page=0

and the source field in the upload form will be filled in with the
actual image URL (e.g. http://i2.pixiv.net/img18/img/ringo78/45792845_big_p0.jpg),
and it will also be used for the "This post was already uploaded" check.
This commit is contained in:
evazion
2014-10-01 17:43:22 -05:00
parent 964b5efcd3
commit 58f0ec3dec
2 changed files with 4 additions and 3 deletions

View File

@@ -36,7 +36,7 @@
<div class="input">
<%= f.label :source %>
<% if params[:url].present? %>
<%= f.text_field :source, :size => 50, :value => params[:url] %>
<%= f.text_field :source, :size => 50, :value => @normalized_url %>
<% else %>
<%= f.text_field :source, :size => 50 %>
<% end %>