last day (14 days later) » 

3:38 PM
6
Q: Why can't this picture be uploaded?

Ookerhttp://www.litaniasports.com/facility/documents/00396-009%20Wave%20Bike%20Rack.jpg I can't come up any idea why this picture cannot be added by uploading from URL. The file size is over 1.6 MB a little bit, so it is much less than the max of 2 MB. Failed to upload image; the format is not s...

 
That error happens inside imgur; as such, I can't tell you what specifically it doesn't like (the error message is fairly generic) - as @ShadowWizard notes: presumably there is an encoding option in use that imgur doesn't like. Options: 1) imgur change their API to allow the format; 2) you re-save the file to tweak the encoding; 2 seems like a more timely fix
 
@Ooker SE's imgur interface from where the API sends the data to imgur... I would like to see what the endpoint respone looks like... we need to look into base64 + url encoding which is causing the wrong interpretation of the final url
 
@Ooker I'll take another look
 
@MarcGravell I agree the response is generic... i know you guys are super busy but please look into the response header .... like I said in the above comment
 
@HackerKarma <error><message>Image format not supported, or image is corrupt.</message>...; I'm checking something, though
@HackerKarma your comment isn't clear, but if you work for imgur ("we need to look into", etc), feel free to ping me at marc@stackoverflow.com, and we can talk more - but I'm not going to dump the raw http (including keys, etc) here ;p
 
3:38 PM
@MarcGravell Appreciated. If that's what imgur sending then they must be striping out all other data like "parameters:, request:, type:, method:, success:.... etc. I think we have to look into the "CONFIG" options that API gets.... base64 encoding ...
 
@HackerKarma some of that is there - not the base-64, but I have a hunch...
 
@MarcGravell I just posted another comment. Hope that is clear. Oh no no, I don't expect to dump that data either. Thanks for the email. I don't work for imgur but they do have a support for API and have submitted the case. Lets' see what their support team says. I will forward it you
@MarcGravell do you have moment to chat? Comments warnings are coming to me
Hi Marc
 
@Hacker my hunch is proving positive; looks simply like we're doing something off in the url encode; should be able to fix it
doesn't affect most urls, but we're unwrapping and re-wrapping this one wrong
 
aha
that's what I guessed it too
 
which is stupid, because we shouldn't try to unwrap it at all :)
 
3:40 PM
exactly
 
I have managed to upload via the url from my local box, so should have a fix shortly
 
wow... awesome ... so may be you can post this findings
so just out of curiosity when URL is sent does it replaces the +/= space chars
becuase they might give problem too
 
indeed, my first hunch was to add .Replace("+", "%20"), but that isn't our problem; I'm working on it!
 
aha... I just don't want code break somewhere else
glad to know that
I guess I can go now.... but please do post your findings when you get done. Thanks for chatting.
 
Looks like it is actually the .NET Uri class being a problem; should be an easy fix to jut... not use that
except for validation, obviously
 
3:45 PM
ok
 
it has a well-known habit of screwing up what you put in
 
yep those URI can cause troubles .... It has in some of my API's especially on UPS and FedEx ones
 
all fixed in the next build
0
A: Why can't this picture be uploaded?

Marc GravellThe reason for that is because the .NET Uri class has a distressing habit of not quite retaining what you put into it ;p In the next build, we have circumvented this glitch, and the url you show above now works fine - as do other URLs.

 
I see the status-completed tag and your honest comment. SE team rocks!!
Have a great bug-less day!
 

last day (14 days later) »