fixed expiration date
This commit is contained in:
@@ -52,7 +52,7 @@ const Upload = () => {
|
||||
showCompletedUploadModal(
|
||||
modals,
|
||||
`${window.location.origin}/share/${bucketId}`,
|
||||
new Date(Date.now()).toLocaleString()
|
||||
new Date(Date.now() + expiration * 60 * 1000).toLocaleString()
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -4,7 +4,12 @@ import sdk from "node-appwrite";
|
||||
const client = new sdk.Client();
|
||||
|
||||
client
|
||||
.setEndpoint(process.env["NEXT_PUBLIC_APPWRITE_HOST"] as string)
|
||||
.setEndpoint(
|
||||
(process.env["NEXT_PUBLIC_APPWRITE_HOST"] as string).replace(
|
||||
"localhost",
|
||||
"host.docker.internal"
|
||||
)
|
||||
)
|
||||
.setProject("pingvin-share")
|
||||
.setKey(process.env["APPWRITE_FUNCTION_API_KEY"] as string);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user