Giter Site home page Giter Site logo

Comments (10)

JustinMKY avatar JustinMKY commented on May 30, 2024

I get this too, have you found solution to this?

from photoshot.

Deuris avatar Deuris commented on May 30, 2024

I get this too, have you found solution to this?

No, I haven't(

from photoshot.

JustinMKY avatar JustinMKY commented on May 30, 2024

I think I found solution, need to create bucket policy and cors policy on bucket

from photoshot.

Deuris avatar Deuris commented on May 30, 2024

from photoshot.

JustinMKY avatar JustinMKY commented on May 30, 2024

My solution says the bucket is public though, I tried setting principals but for some reason it doesn't work and gives 401 error.

Here is my set up though:

  • I unchecked fourth option in Block Public Access (Block public and cross-account access to buckets and objects through any public bucket or access point policies)

My bucket policy is

{
    "Version": "2012-10-17",
    "Id": "Policy1689384910025",
    "Statement": [
        {
            "Sid": "Stmt1689384810241",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:*",
            "Resource": "arn:aws:s3:::bucketName/*"
        }
    ]
}

CORS policy on bucket

[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "GET",
            "PUT",
            "POST",
            "DELETE",
            "HEAD"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": [
            "x-amz-server-side-encryption",
            "x-amz-request-id",
            "x-amz-id-2",
            "ETag"
        ],
        "MaxAgeSeconds": 3000
    }
]

from photoshot.

Navya-re avatar Navya-re commented on May 30, 2024

i get this error in browser

POST https://last-vert.vercel.app/api/s3-upload 405

(anonymous) @ 226-1d6c8af1b9ec75f3.js:100
f @ 226-1d6c8af1b9ec75f3.js:100
n.value @ 226-1d6c8af1b9ec75f3.js:100
(anonymous) @ 226-1d6c8af1b9ec75f3.js:100
oJ @ 226-1d6c8af1b9ec75f3.js:100
a @ 226-1d6c8af1b9ec75f3.js:100
(anonymous) @ 226-1d6c8af1b9ec75f3.js:100
r @ 226-1d6c8af1b9ec75f3.js:100
uploadToS3 @ 226-1d6c8af1b9ec75f3.js:100
L @ dashboard-62dc7448791a4034.js:1
await in L (async)
eV @ framework-3b5a00d5d7e8d93b.js:9
eW @ framework-3b5a00d5d7e8d93b.js:9
(anonymous) @ framework-3b5a00d5d7e8d93b.js:9
rn @ framework-3b5a00d5d7e8d93b.js:9
rt @ framework-3b5a00d5d7e8d93b.js:9
(anonymous) @ framework-3b5a00d5d7e8d93b.js:9
oN @ framework-3b5a00d5d7e8d93b.js:9
eF @ framework-3b5a00d5d7e8d93b.js:9
ri @ framework-3b5a00d5d7e8d93b.js:9
nV @ framework-3b5a00d5d7e8d93b.js:9
nI @ framework-3b5a00d5d7e8d93b.js:9
VM102:1 Uncaught (in promise) SyntaxError: Unexpected end of JSON input
await (async)
eV @ framework-3b5a00d5d7e8d93b.js:9
eW @ framework-3b5a00d5d7e8d93b.js:9
(anonymous) @ framework-3b5a00d5d7e8d93b.js:9
rn @ framework-3b5a00d5d7e8d93b.js:9
rt @ framework-3b5a00d5d7e8d93b.js:9
(anonymous) @ framework-3b5a00d5d7e8d93b.js:9
oN @ framework-3b5a00d5d7e8d93b.js:9
eF @ framework-3b5a00d5d7e8d93b.js:9
ri @ framework-3b5a00d5d7e8d93b.js:9
nV @ framework-3b5a00d5d7e8d93b.js:9
nI @ framework-3b5a00d5d7e8d93b.js:9

from photoshot.

JustinMKY avatar JustinMKY commented on May 30, 2024

i get this error in browser

POST https://last-vert.vercel.app/api/s3-upload 405

(anonymous) @ 226-1d6c8af1b9ec75f3.js:100 f @ 226-1d6c8af1b9ec75f3.js:100 n.value @ 226-1d6c8af1b9ec75f3.js:100 (anonymous) @ 226-1d6c8af1b9ec75f3.js:100 oJ @ 226-1d6c8af1b9ec75f3.js:100 a @ 226-1d6c8af1b9ec75f3.js:100 (anonymous) @ 226-1d6c8af1b9ec75f3.js:100 r @ 226-1d6c8af1b9ec75f3.js:100 uploadToS3 @ 226-1d6c8af1b9ec75f3.js:100 L @ dashboard-62dc7448791a4034.js:1 await in L (async) eV @ framework-3b5a00d5d7e8d93b.js:9 eW @ framework-3b5a00d5d7e8d93b.js:9 (anonymous) @ framework-3b5a00d5d7e8d93b.js:9 rn @ framework-3b5a00d5d7e8d93b.js:9 rt @ framework-3b5a00d5d7e8d93b.js:9 (anonymous) @ framework-3b5a00d5d7e8d93b.js:9 oN @ framework-3b5a00d5d7e8d93b.js:9 eF @ framework-3b5a00d5d7e8d93b.js:9 ri @ framework-3b5a00d5d7e8d93b.js:9 nV @ framework-3b5a00d5d7e8d93b.js:9 nI @ framework-3b5a00d5d7e8d93b.js:9 VM102:1 Uncaught (in promise) SyntaxError: Unexpected end of JSON input await (async) eV @ framework-3b5a00d5d7e8d93b.js:9 eW @ framework-3b5a00d5d7e8d93b.js:9 (anonymous) @ framework-3b5a00d5d7e8d93b.js:9 rn @ framework-3b5a00d5d7e8d93b.js:9 rt @ framework-3b5a00d5d7e8d93b.js:9 (anonymous) @ framework-3b5a00d5d7e8d93b.js:9 oN @ framework-3b5a00d5d7e8d93b.js:9 eF @ framework-3b5a00d5d7e8d93b.js:9 ri @ framework-3b5a00d5d7e8d93b.js:9 nV @ framework-3b5a00d5d7e8d93b.js:9 nI @ framework-3b5a00d5d7e8d93b.js:9

This seems like issues with s3 bucket permissions, check bucket permissions/CORS policies

EDIT: I posted CORS policy above, maybe try that and see if it works.

from photoshot.

Navya-re avatar Navya-re commented on May 30, 2024

Nice , Thank You , It Worked

from photoshot.

Navya-re avatar Navya-re commented on May 30, 2024

One Last Help Man ,
The Images generated are expiring after some time as they are automatically getting deleted from replicate , is there anything im missing s3 bucket , the images aren't uploading to bucket , is there any folder i need to create ?

from photoshot.

JustinMKY avatar JustinMKY commented on May 30, 2024

One Last Help Man , The Images generated are expiring after some time as they are automatically getting deleted from replicate , is there anything im missing s3 bucket , the images aren't uploading to bucket , is there any folder i need to create ?

I have not yet run into an issue like that, so wouldn't know, maybe check server logs and ensure replicate account have billing source added.

from photoshot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.