Skip to content
Advertisement

The path of a URI with an authority must start with a slash “/” or be empty. DigitalOcean Spaces AWS S3 SDK PHP

JavaScript

I don’t fully understand this error, I have tried changing the header request, I don’t know what else to try, I am blank at the moment. I have also assumed it is a problem in the headers. Currently my header request looks like this:

JavaScript

I will also leave the respective php codes:

JavaScript

part where I manage the file for the upload:

JavaScript

Advertisement

Answer

After follow this article, I Have same issue just change your .env and add protocol to endpoint

without protocol i got same error (wrong)
DO_SPACES_ENDPOINT=sgp1.digitaloceanspaces.com

fix just add protocal to do_space (correct)
DO_SPACES_ENDPOINT=https://sgp1.digitaloceanspaces.com

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement