Skip to content
This repository was archived by the owner on Feb 24, 2024. It is now read-only.
This repository was archived by the owner on Feb 24, 2024. It is now read-only.

Add how-to upload images/files (bytea) #540

Description

@laurenceisla

There's an issue right now with binaries sent using multipart/form-data PostgREST/postgrest#922 (comment), but there is an alternative using Javascript, for example with fetch:

const input = document.getElementById('myFileInput'');

fetch('http://localhost:3000/rpc/upload_binary', {
  method: 'POST',
  headers: {
    "Content-Type": "application/octet-stream"
  },
  body: input.files[0]
})

An example using fetch could be added while working on the multipart/form-data implementation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions