(Laravel) How do I move files between folders in Digital Ocean Spaces

September 6, 2018 1.1k views
PHP Frameworks Object Storage Ubuntu 18.04

I can upload images to DO Spaces and view them (both in-app and via public URL) just fine. However, when I attempt to use Storage::move($old_path, $new_path) I receive a 404 Not Found and aNoSuchKey error. The URL being processed looks thusly:

https://myappname.nyc3.digitaloceanspaces.com/my_bucket?prefix=photos%2Ffolder%2F2f19fe78-bf49-4393-beef-c51c7b34c119%2FB4CB6004044A4231A734.jpeg%2F&max-keys=1&encoding-type=url\

Should the prefix include the actual file name? Should there be a trailing %2F after the filename? If not, how do I remove it? I'm simply using Storage::move to make things happen. My "filesystem.php" appears to be configured correctly, although clearly something is amiss. Thoughts?

NOTE: I edited the domain of the URL to obscure the resources for the time being.

Be the first one to answer this question.