robot /html/convert and resize / s3 it

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

I’m trying to use /html/convert robot to make a thumbnail of given URL and then resize the output and send it to S3 bucket.

Template code:

{
'convert': {
'robot': '/html/convert',
'url': some_fancy_url,
},
'resize': {
'use': 'convert',
'robot': '/image/resize',
'resize_strategy': 'crop',
'width': 230,
'height': 230,
'quality': 80,
'strip': True
},
'store': {
'use': 'resize',
'path': '%s.png' % some_id,
'robot': '/s3/store',
'key': my_aws_key,
'secret': another_aws_key,
'bucket': my_aws_bucket
}
},
'notify_url': my_domain + some_id
}

The assembly is marked as “ASSEMBLY_COMPLETED”
However the steps do not produce anything.
The assembly details says that the notification url was not hit yet, while I can see it was, and along with all 5 retries.

The JSON data for assembly is as follow:

{
"ok": "ASSEMBLY_UPLOADING",
"message": "The assembly is still in the process of being uploaded.",
"assembly_id": "REDACTED",
"parent_id": null,
"assembly_url": "http://api2.nadisa.transloadit.com/assemblies/REDACTED",
"bytes_received": 868,
"bytes_expected": 868,
"client_agent": null,
"client_ip": "54.220.235.234",
"client_referer": null,
"start_date": "2013/11/12 23:51:59 GMT",
"is_infinite": false,
"has_dupe_jobs": false,
"upload_duration": null,
"execution_start": null,
"execution_duration": null,
"notify_start": null,
"notify_status": null,
"last_job_completed": null,
"notify_duration": null,
"fields": {},
"running_jobs": [],
"bytes_usage": 0,
"executing_jobs": [],
"started_jobs": [],
"files_to_store_on_s3": 0,
"queued_files_to_store_on_s3": 0,
"parent_assembly_status": null,
"uploads": [],
"results": {}
}

Am I doing something wrong here? Any help appreciated.

Best, Matt

Hey Matt,

I noticed that your URL redirects to a different one (the same one using a .de domain ending). Can you try converting the actual one with the proper domain ending?

Regarding the notification, I am not sure what’s happening here to be honest. : / Maybe the server process got borked after having used too much memory.
Does the problem with the notification happen to you all the time?

Kind regards,
Tim

Co-Founder Transloadit
@tim_kos

Hey Tim,

I can’t change the domain I’m afraid because it is the other end which redirects. The redirection is based on the IP from where the request comes from. Your server is in Germany so it gets .de domain. I get .co.uk so I’m using proxy with IP from US :confused:

The notification issue occurs only in this case, which makes me believing is due to the stupid redirection.

I would be happy to specify proxy server for that robot if it helps you. But I can imagine it might be a challenge if one decides to use kind of slow proxy server.

Thanks, Matt

Hey Matt,

yeah a proxy server should work. I am not sure how else we can make this work smoothly for you. : /

Best,
Tim

Tim,

can’t you “just” follow a redirect in your robot(s)? I don’t mind if the screenshot will come from the .de domain (or any other) because the content is still in original language, and I’m making a thumbnail out of it so one
can barely see the letters on it :wink:

Best, Matt

It is following redirects (up to 5), but for some reason that still does not help.

Hey Tim,

Can I expect some resolutions anytime soon? It’s kind of blocking issue for me.

Also, do you know if it is “/html/convert” robot which fails with redirects, or the other robots are also affected?

Cheers, Matt