potato
potato
Explore posts from servers
FFilament
Created by potato on 5/17/2024 in #β“β”Šhelp
Would it be possible to have a QR code scanner as a form field?
Would it be possible? Or would I need to make a frontend in javascript for this?
5 replies
CDCloudflare Developers
Created by potato on 9/8/2023 in #workers-help
Error when init with yarn
home@portal RESTAPI % yarn create cloudflare@latest
yarn create v1.22.19
[1/4] πŸ” Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] πŸ”— Linking dependencies...
[4/4] πŸ”¨ Building fresh packages...
success Installed "[email protected]" with binaries:
- create-cloudflare
/bin/sh: /Users/home/.yarn/bin/create-cloudflare@latest: No such file or directory
error Command failed.
Exit code: 127
Command: /Users/home/.yarn/bin/create-cloudflare@latest
Arguments:
Directory: /Users/home/Developer/Projects/RESTAPI
Output:

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.
home@portal RESTAPI %
home@portal RESTAPI % yarn create cloudflare@latest
yarn create v1.22.19
[1/4] πŸ” Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] πŸ”— Linking dependencies...
[4/4] πŸ”¨ Building fresh packages...
success Installed "[email protected]" with binaries:
- create-cloudflare
/bin/sh: /Users/home/.yarn/bin/create-cloudflare@latest: No such file or directory
error Command failed.
Exit code: 127
Command: /Users/home/.yarn/bin/create-cloudflare@latest
Arguments:
Directory: /Users/home/Developer/Projects/RESTAPI
Output:

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.
home@portal RESTAPI %
4 replies
CDCloudflare Developers
Created by potato on 9/6/2023 in #workers-help
How to upload png/webp to r2 via worker
I am completely lost on this. My worker basically uses GitHub's REST API to get contents of file from a repo and upload it to r2. But the content comes encoded in base64. How can I upload the image to r2?
2 replies
CDCloudflare Developers
Created by potato on 9/5/2023 in #general-help
[name].app or [name]api.com
I am trying to make an API for a game I like and I need to choose a domain to host it on. Should I just choose [name].app or [name]api.com. I'm open to other suggestions of course let me now. If using [name].app the endpoints would be api.[name].app docs.[name].app If using [name]api.com the endpoints would be [name]api.com/api or api.[name]api.com [name]api.com/docs or docs.[name]api.com
4 replies
CDCloudflare Developers
Created by potato on 9/5/2023 in #workers-help
Can't access r2 object on worker
Cant acces it using worker but can using wrangler cli
const object = await env.BUCKET.get("channels4_profile.jpg");
const list = await env.BUCKET.list();
if (object === null) {
console.log("image doesn't exist");
} else {
console.log(typeof object);
}
console.log(JSON.stringify(object));

console.log(JSON.stringify(list, null, 2));
const object = await env.BUCKET.get("channels4_profile.jpg");
const list = await env.BUCKET.list();
if (object === null) {
console.log("image doesn't exist");
} else {
console.log(typeof object);
}
console.log(JSON.stringify(object));

console.log(JSON.stringify(list, null, 2));
[mf:inf] Ready on http://127.0.0.1:58463/
image doesn't exist
null
{
"objects": [],
"truncated": false,
"delimitedPrefixes": []
}
[mf:inf] GET /__scheduled 200 OK (74ms)
[mf:inf] Ready on http://127.0.0.1:58463/
image doesn't exist
null
{
"objects": [],
"truncated": false,
"delimitedPrefixes": []
}
[mf:inf] GET /__scheduled 200 OK (74ms)
home@portaltree ~ % npx wrangler r2 object get dev/channels4_profile.jpg
⛅️ wrangler 3.6.0
------------------
Downloading "channels4_profile.jpg" from "dev".
Download complete.
home@portaltree ~ % npx wrangler r2 object get dev/channels4_profile.jpg
⛅️ wrangler 3.6.0
------------------
Downloading "channels4_profile.jpg" from "dev".
Download complete.
3 replies
CDCloudflare Developers
Created by potato on 9/4/2023 in #workers-help
Error when trying to get file from r2 via wrangler
home@portaltree ~ % npx wrangler r2 object get myobject/image.png
⛅️ wrangler 3.6.0
------------------
Downloading "image.png" from "myobject".

✘ [ERROR] Failed to fetch /accounts/ACCOUNT ID/r2/buckets/myobject/objects/image.png - 400: Bad Request);


If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose
home@portaltree ~ % npx wrangler r2 object get myobject/image.png
⛅️ wrangler 3.6.0
------------------
Downloading "image.png" from "myobject".

✘ [ERROR] Failed to fetch /accounts/ACCOUNT ID/r2/buckets/myobject/objects/image.png - 400: Bad Request);


If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose
6 replies
CDCloudflare Developers
Created by potato on 9/3/2023 in #workers-help
β–² [WARNING] Miniflare 3 does not support CRON triggers yet, ignoring...
I got this message when trying to use CRON triggers on cloudflare workers. Are there any way to circumvent this?
7 replies
CDCloudflare Developers
Created by potato on 9/3/2023 in #workers-help
Default example that generates when initializing cloudflare worker project not working.
I am trying to run this cloudflare worker code that generated when the project was initialized but it gives me an error. Code: https://hastebin.com/share/meyiraluce.typescript Error: https://hastebin.com/share/atedazewov.typescript https://hastebin.com/share/anemunukoq.javascript
10 replies