Archived from the Transloadit support forum. Originally posted on July 10, 2014; details may be outdated, see our docs for current behavior. Original thread
Hi Guys,
Can you add ignore_errors parameter for /http/import?
Thank you!
-Sergey
Archived from the Transloadit support forum. Originally posted on July 10, 2014; details may be outdated, see our docs for current behavior. Original thread
Hi Guys,
Can you add ignore_errors parameter for /http/import?
Thank you!
-Sergey
Hey Sergey,
you mean that when you import several files over http and one causes an error the others are not affected?
Kind regards,
Tim
Co-Founder Transloadit
@tim_kos
Yes, I would like to be able to ignore errors related to import, so assembly does not fail.
Thank you.
Hey Sergey,
the ignore_errors parameter for the /http/import robot is live now.
Please let me know how it works for you.
Kind regards,
Tim
Co-Founder Transloadit
@tim_kos
Thanks, Tim!
It seems that it is not letting me send an empty value into import_url. I would like to be able to skip http import if empty value is specified. Here is an example:
https://transloadit.com/assemblies/view/REDACTED
Hm I am not sure if we want to allow people to bypass validation as well with “ignore_errors” … I will talk to Kevin about this.
In the meantime you can also set up a /file/filter step that does this for you.
Kind regards,
Tim
Co-Founder Transloadit
@tim_kos
I thought about using file/filter, but I cant quite wrap my mind around how to do it.
/http/import does not accept “use” parameter and neither do I have anything to send into /file/filter’s “use”. Can you help me with an example?
So I want to skip doing http/import if ${fields.import_url} is empty
"import_url": {
"robot": "/http/import",
"url": "${fields.import_url}",
"ignore_errors": true
},
Hey Sergey,
unfortunately we cannot change this right away as strictly speaking it’s breaking backwards compatibility.
Can you please paste the template ID here? I’d like to check it out. One solution I see is that you use a different template ID depending on whether the user provides an import_url. But that would also be hard in case you use signature authentication (which you should).
Can you please explain your use case a bit? That should help us come up with a good solution.
Kind regards,
Tim
Co-Founder Transloadit
@tim_kos
Here it is:
https://transloadit.com/templates/view/REDACTED
I am trying to create an OR condition between “import_s3” and “import_url”
Hey Sergey,
no I mean what is your real use case as in what is your app supposed to do? As in what problem does it solve.
Kind regards,
Tim
Co-Founder Transloadit
@tim_kos
Sorry, I havent had my morning coffee yet.
Our UI has two use cases: one import from HTTP URL, another is “re-import” or “re-encode” existing video, in which case the source of the video is our own S3 bucket. I am trying to keep both within the same template to reduce the maintenance overhead.
My template provides two field parameters: “import_url” and “import_s3”. These are mutually exclusive. import_url is the full URL of a server from which we would import the file. import_s3 is a bucket key for a video in our own S3 bucket.
Does it help?
Hey Sergey,
I think you could fully automate this. And that is you change the upload form so that all videos go into your S3 bucket. So for example for the HTTP URL case your user types in the URL, and you have a template that imports the video into Transloadit and then stores it right away in your bucket.
Then in your app you simply have a cronjob that imports all videos from your S3 bucket and encodes them. If in your database a video is marked as successfully transcoded it will be ignored. If it wasn’t encoded yet or was marked as failed it will be re-transcoded and an email is sent to you to let you know about this problem.
We have implemented something similar for a different customer a couple weeks ago hence I know this works really well.
Kind regards,
Tim
Co-Founder Transloadit
@tim_kos
This discussion has been inactive for 30 days and has been marked as resolved automatically.
Feel free to reply to this ticket to re-open it and we will continue the investigation.
Kind regards,
Tim
Co-Founder Transloadit