Error with /http/import

Archived from the Transloadit support forum. Originally posted on May 11, 2011; details may be outdated, see our docs for current behavior. Original thread

I noticed that transloadit was unable to import an image from a particular url, even though the image loads fine in my browser.

“error”: “IMPORT_FILE_ERROR”, “message”: “Transloadit was unable to import a file.”, “reason”: “400 on GET http://3.bp.blogspot.com/-6XKsrtiMLyI/TZT-UI21qhI/AAAAAAAAGC8/MSSfSe-UJSc/s1600/quote a la folie via birdwithbrokenbones tumblr.jpg”

Try the url in your browser: http://3.bp.blogspot.com/-6XKsrtiMLyI/TZT-UI21qhI/AAAAAAAAGC8/MSSfSe-UJSc/s1600/quote a la folie via birdwithbrokenbones tumblr.jpg

Any idea why this would be?

Sorry, http://3.bp.blogspot.com/-6XKsrtiMLyI/TZT-UI21qhI/AAAAAAAAGC8/MSSfS… a la folie via birdwithbrokenbones tumblr.jpg.

Sorry here’s the url: http://3.bp.blogspot.com/-6XKsrtiMLyI/TZT-UI21qhI/AAAAAAAAGC8/MSSfSe-UJSc/s1600/quote%20a%20la%20folie%20via%20birdwithbrokenbones%20tumblr.jpg

Here’s another url that returns the same error: http://isviral.com/wp-content/uploads/2011/05/LostExposureAirlineTakeOff.jpg

Do you have an assembly id for me?

Here are two that failed with the same error, yet the image loads fine in the browser:

ID: REDACTED
https://transloadit.com/assemblies/view/REDACTED

ID: REDACTED
https://transloadit.com/assemblies/view/REDACTED

Thanks
Gabe

Ok, I solved this.

$ curl -v "http://isviral.com/wp-content/uploads/2011/05/LostExposureAirlineTakeOff.jpg" > /dev/null
 > GET /wp-content/uploads/2011/05/LostExposureAirlineTakeOff.jpg HTTP/1.1
> User-Agent: curl/7.20.0 (i386-apple-darwin10.2.0) libcurl/7.20.0 OpenSSL/0.9.8n zlib/1.2.5 libidn/1.18
> Host: isviral.com
> Accept: */*
> 
< HTTP/1.1 404 Not Found

But if I fake the User-Agent, things work:

$ curl -v -H "User-Agent: Firefox" "http://isviral.com/wp-content/uploads/2011/05/LostExposureAirlineTakeOff.jpg" > /dev/null
> GET /wp-content/uploads/2011/05/LostExposureAirlineTakeOff.jpg HTTP/1.1
> Host: isviral.com
> Accept: */*
> User-Agent: Firefox
> 
< HTTP/1.1 200 OK

Gabe: It seems like those sites seem to protect themselves from automatic scraping. Please let us know if you’d like the ability to provide custom headers for our http import requests, but you need to make sure you’re not violating people’s copyrights.

--fg

Closing this ticket for now because it is old.

Gabe, please reopen it as needed.