Getting started with building a file system provider API for BEE

Follow

Comments

6 comments

  • Avatar
    Johnpaul Burbank

    Hello. I need to develop an endpoint API for the Bee plugin to use for images. The documentation says that the base URL needs to use the https protocol, and it looks like it needs to be an absolute URL. I take it that this means that we can not use a URL like https://127.0.0.1/...? I ask as I work on a local server.

    0
    Comment actions Permalink
  • Avatar
    Sergio M.

    Hi Johnpaul, let me double check with Guillermo and our dev team. I believe that you can use your local server URL as the base URL, along with username and password used to authenticate and connect with the API. Are you getting any errors?

    0
    Comment actions Permalink
  • Avatar
    Johnpaul Burbank

    Hi Sergio. Thanks that would be great. I've also discovered the wonders of https://ngrok.com

    0
    Comment actions Permalink
  • Avatar
    Johnpaul Burbank

    Hi Sergio and / or others. In the creation of my FSP endpoint for images I have been able to create the GET and POST method actions. But for some reason the DELETE method on the endpoint does not reach my server. It does not hit a break point at the beginning of the receiving function. It gets through for GET and POST.


    When I use a RESTful client (such as Postman) to hit my endpoints directly, a DELETE request is properly received. There might be a error on your end. In my browser console I sometimes see an error from bee code.


    DELETE https://rsrc.getbee.io/api/cloudstoragemb.jpeg 500 (Internal Server Error)

    It could be something on my server side, but I thought I would ask if there is anything that sticks out to you.


    Thanks,
    Johnpaul


    -------


    Addendum


    I am also curious about error or fail responses sent back to the server. This article explain the data shape for a response in the case of a fail or a error. I've tried this and I don't see any of these message showing up in the file browser. 


    One of the cases that I would like to show this is when a user attempts to create a folder. At this time our API allows for adding images into the base folder, but does not allow sub folders creation. I would like to return an error response with a value that would show in a message dialog. Perhaps it is matter of using a specific error code in the response? I have seen an error dialog in my experimentation with the FSP API, but it has been when I sent back an invalid response and the message seemed to be static.


    Thank you

    0
    Comment actions Permalink
  • Avatar
    Johnpaul Burbank

    Hello all. Hope you had a good thanksgiving. I wonder if anyone could respond to my question above. Cheers

    0
    Comment actions Permalink
  • Avatar
    Sergio M.

    Hi Johnpaul, I've opened a support ticket for our dev team to review. Please use your developer portal to submit these type of technical requests. Thank you!

    0
    Comment actions Permalink

Please sign in to leave a comment.