Learn Catalyst Series #4 : File Operations with File Storage

Learn Catalyst Series #4 : File Operations with File Storage

Continuing on our Let us Learn Catalyst series, today, let us learn how to handle the FileStore from Catalyst.

Imagine a scenario that you need to upload files to the cloud as you are running out of space or you just need your files to be accessible whenever you are on the move irrespective of the device you are on. You can use File Storage by Catalyst.

Because Catalyst gives you the ability to make REST APIs with ease, we will write and invoke the APIs to show the various CRUD operations.

 

Let us look at the UI first

Let us try uploading a file first.

If you notice, all that you need to do is to invoke function calls :

to upload a file

https://fileupload-downloadservice-698833516.development.catalystserverless.com/server/file_upload_service_function/upload

You need to send the file as multipart form data in a key named "data".

to get the list of files 

https://fileupload-downloadservice-698833516.development.catalystserverless.com/server/file_operations/getFileDetails

to delete a file 

https://fileupload-downloadservice-698833516.development.catalystserverless.com/server/file_operations/deleteFile/<file_id>;

to update a file 

https://fileupload-downloadservice-698833516.development.catalystserverless.com/server/file_operations/updateFile/<file_id>;

You need to send the file as multipart form data in a key named "data".

Follow the steps below to recreate the above project

  1. Create a Project in Catalyst

  2. Create a Folder in the File Storage

  3. Note the folder id

  4. Now replace the folder id in the code (refer to GitHub for the code and the comments)

  5. Now run Catalyst Deploy and the response that you get now are the endpoints that you need to work with.

Pls find the Github link - https://github.com/catalystbyzoho/learncatalyst-filestoreoperations-node

We would like to think that we can and do make a difference. As usual, we would love to hear from you on how you went about using Catalyst.

We welcome all queries from you, which you can either post here or you can write to us at support@zohocatalyst.com.
Await for the next post in the Learn Catalyst Series.

- Team Catalyst

    • Announcements

    • Important Announcements in Support for Catalyst Features

      Hello Catalyst Users, This announcement is to bring to your notice some of the recent updates in our support for various Catalyst components, to ensure that your existing Catalyst applications function properly. You can continue to build robust applications
    • Introducing Catalyst 2.0, the simplest cloud-based pro-code development platform.

      Dear Catalyst Community, We are beyond thrilled to present you Catalyst 2.0—the new-age, pro-code development platform that redefines the way you build, deploy, and scale apps. Catalyst 2.0 is not a mere upgrade, but a significant leap into the future
    • Set budgets to optionally disable your Catalyst production environment

      Hello all,    We are pleased to inform you that you can now configure the automatic disabling of a project's production environment upon reaching a specified budget's threshold. Budget alerts in Catalyst facilitate setting usage limits in amounts or Catalyst
    • #CatalystServerless Hackathon 2022

      We are pleased to announce #CatalystServerless Hackathon with prizes worth $5000 up for grabs. Create a working prototype aimed to solve a critical business issue using Catalyst and stand a chance to win exciting prizes. The Hackathon will happen in 3
    • Share your interest to participate in the #CatalystServerless Blogathon

      Hi, we are working on announcing the next edition of the #CatalystServerless Blogathon. Please fill up this form to stay posted on all updates related to the Blogathon. https://zfrmz.com/JN9ChxPU9JQpPgB1vRp8

      Catalyst Community