From my understanding, Storage::putFile is used to upload a file directly to a service such as s3 as opposed to moving it through the web server. However, Storage::disk('s3')->putFile() seems to be invalid. If I want to upload to a non-default disk, I need to use Storage::disk('s3')->put() instead.
Is there a workaround to this, or am I stuck having to save to the default disk if I want to directly upload to s3?
@zerraph I need to check that. This quote from the docs makes it seem possible
The putFile and putFileAs methods also accept an argument to specify the "visibility" of the stored file. This is particularly useful if you are storing the file on a cloud disk such as Amazon S3
@Sinnbeck To be clear, I can save files to s3. I am just having to use s3 as my default disk and use the Storage::putFile method. This means, however, that I wouldn't be unable to use putFile if I wanted to also have a different disk that isn't the default.
So in summary, Storage::putFile (which will save to the default disk) seems valid. And Storage::disk('s3')->putFile seems invalid.
@Snapey Interesting. After more testing, I got it to work as well. I'm still getting the error from VS Code, though. That's very confusing to me, but I do appreciate your insights. Thank you very much.