Danbooru

Can't upload from Mihuashi direct image link

Posted under Bugs & Features

Mihuashi artwork pages doesn't work since the bookmarklet doesn't cover this site. But usually the direct image link works. But I've tried both https://image-assets.mihuashi.com/permanent/6355|-2023/05/15/08/Fgan5Amnrygo-JDPdAV2i72rEMS8.png!artwork.detail and https://image-assets.mihuashi.com/permanent/6355|-2023/05/15/08/Fgan5Amnrygo-JDPdAV2i72rEMS8.png but it kept on telling me that it's a "bad URI". Any solutions? Or is download and upload manually the only way?

magcolo said:

Mihuashi artwork pages doesn't work since the bookmarklet doesn't cover this site. But usually the direct image link works. But I've tried both https://image-assets.mihuashi.com/permanent/6355|-2023/05/15/08/Fgan5Amnrygo-JDPdAV2i72rEMS8.png!artwork.detail and https://image-assets.mihuashi.com/permanent/6355|-2023/05/15/08/Fgan5Amnrygo-JDPdAV2i72rEMS8.png but it kept on telling me that it's a "bad URI". Any solutions? Or is download and upload manually the only way?

Try
https://image-assets.mihuashi.com/permanent/6355%7C-2023/05/15/08/Fgan5Amnrygo-JDPdAV2i72rEMS8.png%21artwork.detail
or
https://image-assets.mihuashi.com/permanent/6355%7C-2023/05/15/08/Fgan5Amnrygo-JDPdAV2i72rEMS8.png

I suspect that the site doesn’t like the pipe character ("|"), so you have to replace it with the urlencoded equivalent "%7C".

kittey said:

Try
https://image-assets.mihuashi.com/permanent/6355%7C-2023/05/15/08/Fgan5Amnrygo-JDPdAV2i72rEMS8.png%21artwork.detail
or
https://image-assets.mihuashi.com/permanent/6355%7C-2023/05/15/08/Fgan5Amnrygo-JDPdAV2i72rEMS8.png

I suspect that the site doesn’t like the pipe character ("|"), so you have to replace it with the urlencoded equivalent "%7C".

Tested the link with "%7C", bookmarklet automatically converts it back to "|".
Message: "Upload failed: bad URI(is not URI?): "https://image-assets.mihuashi.com/permanent/6355|-2023/05/15/08/Fgan5Amnrygo-JDPdAV2i72rEMS8.png"."

magcolo said:

Thank you so much! Could you explain why "%%37C" works? What does cheat twice mean?

I guess the site doesn't like the pipe | in the URL. Invalid characters in URLs can be replaced with URL-encoding, which means using % and the hex code of the character. %7C is the URL-encoded version of the pipe, but using it doesn’t help you because the site runs a pass of URL-decode on the input. So to get around that, encode the 7 in the encoded version again. 7 is not an invalid character, but it’s still allowed to encode it. 7 encoded is %37. That gives you %%37C. %% can’t be decoded, so inputting that in the form will make the site decode the %37 to 7 and then pass the %7C to the mihuashi server, which decodes it to |.

1