Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

michaelnguyen547's avatar

unable pass uploadFiles gate when uploading to s3 via Vapor

I follow the instruction to set up Policy @ https://docs.vapor.build/1.0/resources/storage.html#file-uploads

I have 'admin' guard for Admin account.

Every time, vapor/signed-storage-url return 403 - authorized.

This is the code doing the check

        Gate::authorize('uploadFiles', [
            $request->user(),
            $bucket = $request->input('bucket') ?: $_ENV['AWS_BUCKET']
        ]);

Any ideas?

0 likes
1 reply

Please or to participate in this conversation.