ahmedkandel / nova-s3-multipart-upload

A Laravel Nova resource tool to upload files directly to Amazon S3. You can (upload | download | delete) single, multiple, small or big files.
MIT License
22 stars 22 forks source link

DigitalOcean Spaces or Local Disk Support #16

Closed Milkhan closed 3 years ago

Milkhan commented 3 years ago

Thank you for this nice package Is it possible to make it work with digitalocean or local disk?

ahmedkandel commented 3 years ago

I think it should work with DigitalOcean as it has S3 compatible API. While for the local disk it has no sense as the main purpose of this packages is to avoid loading the server as much as it can.

ahmedkandel commented 3 years ago

Closed due to inactivity.

modernben commented 2 years ago

@ahmedkandel I'm getting an invalid url issue. It looks like there is some rebuilding of URLs going on.

"Error executing \"CreateMultipartUpload\" on \"https://dialedhealth.s3.sfo2.amazonaws.com//daily-dialed/2022-07-26/22d877ee-aade-4446-8b89-e721e509eb1b.mp4?uploads\"; AWS HTTP error: cURL error 6: Could not resolve host: dialedhealth.s3.sfo2.amazonaws.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://dialedhealth.s3.sfo2.amazonaws.com//daily-dialed/2022-07-26/22d877ee-aade-4446-8b89-e721e509eb1b.mp4?uploads",

Nowhere in my code do I have s3 or amazonaws.com

ahmedkandel commented 2 years ago

@modernben it would be better to open a new issue instead of commenting here. Anyway it seems that you have issue in Laravel S3 disk configuration. Can you check?

"Nowhere in my code do I have s3 or amazonaws.com" what do you mean?

modernben commented 2 years ago

My disk definition is good to go and working with the rest of the site. In fact, that's what I am using to upload using the File field. Screen Shot 2022-07-29 at 9 15 27 AM

Screen Shot 2022-07-29 at 9 14 37 AM

The URL in the error (https://dialedhealth.s3.sfo2.amazonaws.com/) seems like either this package or the underlying Uppy dependency is rewriting the URL to upload to. It shouldn't be https://dialedhealth.s3.sfo2.amazonaws.com/ it should be https://sfo2.digitaloceanspaces.com/. The same that is in the disk config.