最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

catalystbyzoho - How to provide temporary access to users to upload files to Zoho Catalyst Stratus? - Stack Overflow

programmeradmin0浏览0评论

I have a catalyst application that runs on Express in backend and React in Frontend. I want to provide my app users a temporary URL to upload their files from their application without exposing their own user credentials to their customers.

I need a temporary public URL that my app users can share with their customers to upload files to my application.

As of now, I am uploading the files by getting the files from frontend and pass it to my express server and uploading the file from the server end.I want my user's customers to upload the files directly to the Stratus Bucket without needing to pass it to my server.

I have a catalyst application that runs on Express in backend and React in Frontend. I want to provide my app users a temporary URL to upload their files from their application without exposing their own user credentials to their customers.

I need a temporary public URL that my app users can share with their customers to upload files to my application.

As of now, I am uploading the files by getting the files from frontend and pass it to my express server and uploading the file from the server end.I want my user's customers to upload the files directly to the Stratus Bucket without needing to pass it to my server.

Share Improve this question asked Feb 4 at 6:44 Mark JohnsonMark Johnson 211 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

A presigned URL will help you solve this use case. Presigned URLs are secure URLs that authenticated users can share with their non-authenticated users. This URL will provide non-authenticated users with temporary authorization to access objects.

You can generate these URL in your application using Catalyst Node SDK from your Express application by installing the latest beta SDK using the below command

npm install zcatalyst-sdk-node@beta

Once installed you can use the below sample code snippet to generate a presigned URL for the Stratus bucket from your express application

// Get a stratus instance
const stratus = app.stratus();
const signedURLRes = await bucket.generatePreSignedUrl("sam/out/sample.txt", 'PUT', {
    'expiryIn': 100, // expiry time in seconds
    'activeFrom':'12334454327', // activate the url in the given date
});
console.log(signedURLRes);

To know more you can find the official help documentation here.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论