filestack / filestack-ruby

Official Ruby SDK for Filestack - API and content management system that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
https://www.filestack.com
Apache License 2.0
34 stars 27 forks source link

Filestack scanning viruses #33

Closed huyvohcmc closed 4 years ago

huyvohcmc commented 6 years ago

Sorry to ask this question but does filestack scan viruses for every uploaded file? Is there a doc somewhere?

julioalucero commented 5 years ago

Why was close?

huyvohcmc commented 5 years ago

@julioalucero because it doesn't.

julioalucero commented 5 years ago

@huyvohcmc Filestack support it https://www.filestack.com/docs/concepts/workflows/virus-detection/. But seems that this library still does not support send something like:

client.upload(filepath: 'tmp/test.pdf', options: {'workflows': ["23dfd7cb-359e-4e53-8918-dca35790a74b"]})

Or I'm sending the wrong params 🤔, I didn't found docs about it

julioalucero commented 5 years ago

For the records, the correct url is: https://cdn.filestackcontent.com/<APIKEY>/store=workflows:["<workflow_id>"]/<external-url>

julioalucero commented 5 years ago

Updated: To use a Workflow the correct url is to use the workflow_id without quotes:

https://cdn.filestackcontent.com/<APIKEY>/store=workflows:[<workflow_id>]/<external-url>

Example: "https://cdn.filestackcontent.com/DFDmms4UET7iE234ma32G2343/store=workflows:[jskfj9023-359e-4e53-8918-ajsdklfj90238493]/https://cdn.filestackcontent.com/kdjfkj90234293kjsdf"

gabifija commented 4 years ago

@julioalucero @huyvohcmc I apologize for a late reponse. In filestack-ruby 2.7.0, I've added a workflows support. Now you should be able to do: client.upload(filepath: 'tmp/test.pdf', options: { workflows: ["23dfd7cb-359e-4e53-8918-dca35790a74b"]}). Let me know if it helps.