Try a search for camera Sony 100 euros, lots come up albeit for me UK centric. Cybershot are really good.
There might be some cheaper cameras out there, you can pick up bargains these days for digital SLR and/or mirrorless cameras. It’s hard to be more specific than that other than to say have a look on your favourite second hand sites etc.
Sharing some #flowerstr

Unless you have a prior project with IPFS I would simply use blossom. But since you asked:
# Step 1: Get filesize and hash using ipfs-car. The hash is the CID.
```
const { exec } = require('child_process');
async function getFileHashAndSize(file) {
return new Promise((resolve, reject) => {
const npxPath = '/usr/local/bin/npx'; // Full path to npx
exec(`${npxPath} ipfs-car hash ${file}`, (error, stdout, stderr) => {
if (error) {
return reject(new Error(`Error getting file hash: ${error.message}`));
}
const hashOutput = stdout.trim();
const hash = hashOutput.split(' ')[0];
exec(`wc -c < ${file}`, (error, stdout, stderr) => {
if (error) {
console.error(`Error executing wc command: ${stderr}`);
return reject(new Error(`Error getting file size: ${error.message}`));
}
const size = stdout.trim();
resolve({ hash, size });
});
});
});
}
```
# Step 2: Create JSON to upload to endpoint using acquired hash and filesize
```
function createStoreJson({ hash, size }) {
try {
if (!hash || !size) {
throw new Error('Invalid hash or size');
}
return {
tasks: [
[
'store/add',
'did:key:{StorageRepoID}',
{
link: {
'/': hash,
},
size: parseInt(size, 10),
},
],
],
};
} catch (error) {
throw new Error(`Error creating JSON: ${error.message}`);
}
}
```
# Step 3: Post JSON (not file) to web3 endpoint. This then tells you whether the data already exists or if you have to then upload the file as well.
```
// WEB3_STORAGE.ENDPOINT = https://up.web3.storage/bridge
async function postFun(json) {
try {
const response = await axios.post(WEB3_STORAGE.ENDPOINT, json, {
headers: {
'X-Auth-Secret': WEB3_STORAGE.SECRET,
'Authorization': WEB3_STORAGE.AUTH,
'Content-Type': 'application/json',
},
});
return response.data;
} catch (error) {
let errorMsg = `Error posting to ${WEB3_STORAGE.ENDPOINT}: ${error.message}`;
if (error.response) {
errorMsg += `\nResponse status: ${error.response.status}`;
errorMsg += `\nResponse data: ${JSON.stringify(error.response.data)}`;
}
throw new Error(errorMsg);
}
}
```
# Step 4: Post the file if step 3 returns false. The endpoint (puturl in this case) will be provided by the previous step, and is ALWAYS an AWS endpoint 😀
I've left the JSDoc comment here since there's a few more parameters.
```
/**
* Function to upload a file using a PUT request.
* @param {Object} params - The parameters for the PUT request.
* @param {string} params.putUrl - The URL to send the PUT request to.
* @param {number} params.size - The size of the file in bytes.
* @param {string} params.checksumSha256 - The SHA-256 checksum of the file.
* @param {string} params.filename - The path to the file to be uploaded.
* @returns {Promise
*/
async function putFun({ putUrl, size, checksumSha256, filename }) {
try {
const response = await axios.put(putUrl, fs.createReadStream(filename), {
headers: {
'Content-Length': size,
'x-amz-checksum-sha256': checksumSha256,
},
maxBodyLength: Infinity,
});
return { status: response.status, data: response.data };
} catch (error) {
let errorMsg = `Error putting file: ${error.message}`;
if (error.response) {
errorMsg += `\nResponse status: ${error.response.status}`;
errorMsg += `\nResponse status: ${error.response.data}`;
}
throw new Error(errorMsg);
}
}
```
Thanks, seems pretty comprehensive and to be honest I’ll probably opt for Blossom in future projects. I’m getting more and more engrossed in Nostr at the minute.
I’ve posted videos to Nostr recently and intrigued to know how it works
I'm forced to use the ipfs-car CLI library now web3.storage (and nft.storage) have started to make their process a bit more restricted. I avoid using their NodeJS libraries wherever possible since they change / break too often. https://web3.storage/docs/concepts/car/#ipfs-car
Previously you could shove any data you want to an IPFS endpoint and it would kindly return the IPFS CID, now you need to generate the CID and some other file-specific info prior to uploading.
Thankfully getting data is still straightforward and can be requested anonymously from any number of IPFS gateways.
Happy to share NodeJS snippets if you want a primer since it's a bit tedious to work through their docs.
That would be interesting to see, yes please as I’d like to have a look into these things
In some Nostr apps, I follow people and then they show up as not being followed a day or so later #asknostr
How fantastic!
nostr:note1kd4mmun0zaxfnkzefdct0ekzvu223n39peua522ce25rrzncw9hsq05jnh
Wow that takes me back to the 90s, kind of miss those days in a way.
#asknostr
nostr:note1kz8u5prglz7w4wh7al65l5kwqgft2hgjtnhq53y9hzmdqess7x0qagqgc7
Looking forward to two very different things this week. The first is trying to paddleboard tomorrow evening, having kayaked for years. The second is performing some music at ModCaf on Thursday night with my modular/semi-modular synth gear. Only potential if time allows.
It’s like a lot of things in technology, hurdles can be overcome to a point. Do you use any particular tools for your IPFS tasks that you feel make all the difference?
As you can see, the tree is the star of the show, the moon looks more like a torch being shone in my face! Will keep trying.
GM
Have some sunflowers folks!

Yes! You’d hear that brrr-duh-brrrr-duh sound, can’t think of any other way to describe it! I had these speakers.
I’ve now got a Primal wallet whuch have just been released in the uk. On Friday received my first zaps and sent some too.
It's a Golang thing that reads from a bunch of Markdown files, serves them as HTML but also as Nostr kind 30023 when asked for. It exposes an HTTP interface but also a Nostr relay interface using https://github.com/fiatjaf/khatru.
Interesting stuff, this could be my first venture into creating a relay in order to try this out and I’m happy to do that and get involved in these projects where I can.
I’m on Bluesky and obviously here too but where am I right now!? Here Nostr’ing and having fun which I can’t say I do over there.

