<Will_>
yeah that line needs more detail "Argument “path” is of file type. This endpoint expects a file in the body of the request as ‘multipart/form-data’."
<Will_>
so the body needs an argument of path?
<Will_>
so im sending an object {path: file}
<Will_>
in the body?
<limbo_>
Question: have you done regular file uploads before? I have not.
<limbo_>
It seems to just be in the body of a post request.
<limbo_>
based on what the cURL example on that page looks like to the server.
palkeo_ has joined #ipfs
<Will_>
ill keep trying, if i get it, can we update the doc with more detail
Miezel has quit [Quit: This computer has gone to sleep]
<limbo_>
Will_: if you're on a unix machine, I suggest running ncat -kl 9898 and sending a file to it with cURL. Like curl localhost:9898 -F file=@example.txt
Guest3914 has quit [Quit: This computer has gone to sleep]
Miezel has joined #ipfs
Bhootrk_ has joined #ipfs
Bhootrk_ has quit [Max SendQ exceeded]
Mateon3 has joined #ipfs
Mateon1 has quit [Ping timeout: 255 seconds]
Mateon3 is now known as Mateon1
reed_ has joined #ipfs
aboodman has quit [Quit: aboodman]
djangod has joined #ipfs
<djangod>
when people say they're storing data in ipfs, are they modifying a json file? or small json objects for each profile?
Will_ has quit [Quit: Page closed]
zorba has joined #ipfs
jaboja has quit [Ping timeout: 260 seconds]
reed_ has quit [Ping timeout: 248 seconds]
slaejae has joined #ipfs
clemo has quit [Ping timeout: 268 seconds]
<kpcyrd>
I'm doing a regular multipart file upload in my code. url is `http://go-ipfs:5001/api/v0/add?pin=true` and the post body contains my file as "file"
ygrek has quit [Ping timeout: 248 seconds]
<kpcyrd>
djangod: most likely the later
<kpcyrd>
I usually use ipfs for immutable object storage, so I add data once, give the user the resulting hash and there's no way to modify it
_whitelogger has joined #ipfs
athan has joined #ipfs
zorba has left #ipfs ["WeeChat 1.4"]
dimitarvp has quit [Quit: Bye]
Miezel has quit [Quit: This computer has gone to sleep]
dignifiedquire has quit [Quit: Connection closed for inactivity]
Miezel has joined #ipfs
palkeo_ has quit [Ping timeout: 246 seconds]
jhand has quit [Quit: Connection closed for inactivity]
appa has joined #ipfs
_whitelogger has joined #ipfs
djangod has quit [Quit: Page closed]
tgdnt[m] has joined #ipfs
vindelschtuffen has quit [Ping timeout: 246 seconds]
appa has quit [Ping timeout: 240 seconds]
appa has joined #ipfs
cmbrnt has quit [Ping timeout: 276 seconds]
Miezel has quit [Quit: This computer has gone to sleep]
tulior has quit [Ping timeout: 255 seconds]
Miezel has joined #ipfs
Miezel has quit [Client Quit]
slaejae has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chris613 has quit [Quit: Leaving.]
slaejae has joined #ipfs
appa has quit [Ping timeout: 260 seconds]
appa has joined #ipfs
rcat has joined #ipfs
rcat has quit [Client Quit]
rcat has joined #ipfs
stavros has joined #ipfs
<stavros>
hey everyone
<stavros>
i made a pinning service and would appreciate feedback on it: https://www.eternum.io/
slaejae has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
slaejae has joined #ipfs
ilyaigpetrov has joined #ipfs
hiq[m] has left #ipfs ["User left"]
clemo has joined #ipfs
espadrine_ has joined #ipfs
rendar has joined #ipfs
pat36 has joined #ipfs
slaejae has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
slaejae has joined #ipfs
stavros has quit [Quit: Leaving]
Caterpillar has joined #ipfs
slaejae has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<SchrodingersScat>
will_: and you say in your question that you really want to send to: I want to send the selected file to 'https://ipfs.infura.io:5001/api/v0/add'
<will_>
how wold you go about getting an image from the browser to IPFS?
<lemmi>
js-ipfs or running a local gateway
<SchrodingersScat>
would it be changing "Writable": false, to true?
<lemmi>
everything else is just a ticking bomb
<will_>
the users are accessing the site in a browser i can ask them to install a local gateway
<will_>
cant*
<SchrodingersScat>
users ruin most things, it's true
<will_>
agreed
<SchrodingersScat>
or do you simply make the API open to the public and it's writable then?
<lemmi>
will_: the moment you open up your gateway, you need to be prepared that people upload things that aren't necessarily images and that aren't legal
<SchrodingersScat>
hmm, isn't the gateway for download? I may be severely confused about this, excuse me if I am.
<lemmi>
a writeable gateway is effectively an exposed node
rendar has quit [Ping timeout: 260 seconds]
<SchrodingersScat>
so you would have to change that config setting to true? Or is it as simple as opening up the API port to the public?
<lemmi>
when you run go-ipfs daemon, most calls to ipfs will go through that api
<will_>
So IPFS in the browser is really a read only thing
<SchrodingersScat>
like, ignoring that it's a bad idea
<lemmi>
SchrodingersScat: you need to bind to public interface and set writeable, yes
* SchrodingersScat
sets his node to writable and watches the viagra ad spam flow in
<SchrodingersScat>
that's what the internet is all about, selling pills to give your gramps a boner.
<will_>
can set writable but have somthing like CORS where onlymy domian can access it?
<lemmi>
will_: what potentially could work, but doesn't out-of-the-box: you notify a service about a hash. on that service you grab that hash and look what it is. after that, you could then add it to a node
<lemmi>
will_: what's the problem with users running js-ipfs?
<will_>
the boss wont have browserified code
<lemmi>
having users run a node in the browser makes them liable at first
<SchrodingersScat>
will_: tell him it's 'in the cloud'
<will_>
lol like his head
<SchrodingersScat>
naw, we know where his head is stuck up...
<will_>
I do get it, it feels less legit somehow
<lemmi>
what's the problem with browserfied code?
<will_>
lets not go down that rabbit hole
<will_>
its just now an optio formeright now
<lemmi>
i mean, i avoid js where i can and even more so the rediculous tooling around it that evolved, but in the end it's just js copyied to together into one file, no?
<will_>
unit testing browseried code is a nightmare
<lemmi>
this is probably just the result of someone doing the bundling for you, but whatever makes the boss happy, right?
<SchrodingersScat>
yeah, probably not awesome to depend on if you're using it commercially? but idk how they operate
<will_>
wow 2MB!
<lemmi>
it's a complete node
<will_>
thats not going to fly
<will_>
2MB my boss will spot it and scream
<SchrodingersScat>
chrome already eats 6GB, get with the times?
<will_>
lol
<lemmi>
gzipped 500k
<SchrodingersScat>
will_: sounds like an interesting project, hope you figure out a path
<will_>
a mobile web app downloading that
<will_>
yeah thank you for your help
<SchrodingersScat>
ah, k
<will_>
its been great to understand IPFS a bit more
<lemmi>
will_: you are handling images. a single 2mb download (can be cached) is really going to be a problem?
<SchrodingersScat>
heh, well I could see pissing off users if they had to redownload it each time they load the app or something
<lemmi>
will_: maybe explore the option of accepting images directly and the adding them to ipfs once everything checks out, so nobody will flood your gateway
<will_>
on a mobile device its just not going to work, yes wecan cache it, but still
<will_>
I need some way to ensure the upload has come from my domain
<will_>
1more question when using js-ipfs you say it spawns a full node, then when i add a file is it pinned on the node thats spawned?
<will_>
and when the user closes the browser i guess that node stops running and the imageis lost?
<lemmi>
will_: yes. unless someone else pins it
<lemmi>
will_: you could notify a server to pin the image of course
<will_>
so the second they close the browser the image is lost?
<will_>
or does it live on for awhile?
<lemmi>
will_: yes. unless someone pins it
<will_>
so whats the point of having a js-ipfs, i guess its alittle better than having it in local sotrage
<will_>
storage*
<lemmi>
will_: i guess the problem is that you don't actually make use of ipfs
<will_>
interesting what am i missing ?
<will_>
how should i be using it?
<lemmi>
ipfs works best when it can run for a while. joining the network comes at an initial cost, but when you run for a while and also seed data, then you are valuable to the network
rendar has joined #ipfs
<lemmi>
will_: mobile devices, at least the kinds of plans normal people can pay, is still too expensive and slow
<lemmi>
so ipfs won't help you there
<lemmi>
you could potentially use ipfs internally and using it as a cdn
<lemmi>
but say you are in a room and wifi with 10 other people hanging out on webpage looking at the same picture, then ipfs could help
<lemmi>
but for a single user on a slow mobile connection, probably not so much
<will_>
Yeah I think I get it now, the public gateways are fine for reading data, not fine for adding data, js-ipfs will allow a user to add a file to IPFS but as soon as they close their browser its cant be accessed by anyone else
<will_>
IPFS is best used when installed and left running on a machine,where the user takes responsibility for what is added
<lemmi>
public gateways are only a crutch to have ok-ish access to what you can find within the ipfs net.
<lemmi>
will_: exactly
<lemmi>
but the moment a gateway is involved, it's not ipfs anymore
<lemmi>
it just http
<will_>
my boss will spit when i tell him IPFS isn't for us
zuck05 has quit [Remote host closed the connection]
<lemmi>
maybe he did not understand what ipfs is
<lemmi>
and had the wrong expectations
<will_>
for sure he didnt
<will_>
he thinks its a decentralised file system
m0ns00n has joined #ipfs
<lemmi>
it is, but for that to work, every device has to do its part
<will_>
dong its part means staying online
<lemmi>
yes
<lemmi>
at least if you want add data to the network
<lemmi>
it has to be seeded
<lemmi>
reading data is no problem
<will_>
So for example if every user of facebook were to use js-ipfs for their avatar image, we would have loads of broken links for every user whois not online
<will_>
and i dont have their images cached
<lemmi>
will_: no. facebook surely would run ipfs nodes that pinned the avatar, other people that recently used that image can source it, too
<Mateon1>
will_: For a big site like Facebook, it would be expected that Facebook seeds all user profiles
<Mateon1>
IPFS would act like a CDN, but Facebook would still have to store the data
<will_>
SO the user would have to send their profile image to facebook, facebookwojld add it to a IPFS node and pin it
<lemmi>
will_: that's one option
<will_>
another?
<lemmi>
will_: and i think i already suggested that approach
<will_>
the users runs a node and leaves the machine on
<Kubuxu>
user adds it to IPFS, and shares the link with facebook
<lemmi>
will_: the user adds the image on its own node and notifies facebook of the hash
<Kubuxu>
so facebook pins it and stores it for others
<lemmi>
facebook can then pin it
<will_>
you did i'm just maknig sure i have it right
<lemmi>
ok
<Mateon1>
will_: The user "uploads" their profile picture to js-ipfs, and Facebook code asks the facebook servers to pin the profile picture. Now both the user and Facebook seed the picture
<Mateon1>
When somebody downloads the picture using js-ipfs, they also seed it
<will_>
ok I got it now
<Mateon1>
In order to prevent users from running out of harddrive space, a garbage collection is ran regularly, to only keep pinned content, and get rid of cached content
<lemmi>
will_: you'd probably better off using ipfs as cdn initially with your company adding the files to ipfs. it also ensures you remove exif data you wouldn't want every user to expose etc
Encrypt has joined #ipfs
<SchrodingersScat>
will_: and at that rate you could probably just have the phone upload it to 'facebook' and have facebook insert it then host it via ipfs to act as a sort of reverse proxy to central storage machines?
Guest10765 has quit [Ping timeout: 240 seconds]
<will_>
yeah im totally with itnow
<will_>
again thank you
sirdancealot has joined #ipfs
<SchrodingersScat>
I don't even know what 'it' is :(
<limbo_>
Is communication between nodes encrypted in ipfs?
<Mateon1>
limbo_: Yes, network traffic is end-to-end enrypted between nodes, but data is not encrypted
<limbo_>
cool. Pretty sure I get it now.
mildred1 has quit [Ping timeout: 260 seconds]
appa has quit [Read error: Connection reset by peer]
equalunique[m] has joined #ipfs
Encrypt has quit [Quit: Quit]
pat36 has quit []
appa has joined #ipfs
chris613 has joined #ipfs
MDude has quit [Ping timeout: 260 seconds]
<will_>
I talked to the boss and he is happy with the security risk of allowing anyone to add files to his IPFS gateway, to allow that do I need to use ipfs-api.js or can i just pake a POST to https://ipfs.mysite.io:5001/api/v0/add
redsteakraw[m] has joined #ipfs
fairness[m] has joined #ipfs
<Mateon1>
js-ipfs-api is a convenience wrapper around the HTTP API. It does the same things as POSTing to the ipfs API
<Mateon1>
It's just easier to do
Miezel has quit [Quit: This computer has gone to sleep]
<will_>
how dificult is making a multipart form POST?
<tango>
however if I do a ipfs cat /ipfs/<peerID>/readme
<tango>
it doesnt return anything..
Mateon3 has joined #ipfs
<tango>
i realise the video was recorded a while back.. has the commands changed since then? or am i using the wrong commands?
Mateon1 has quit [Ping timeout: 248 seconds]
Mateon3 is now known as Mateon1
enzo__ has quit [Quit: Leaving]
anewuser has quit [Ping timeout: 260 seconds]
bthesorceror has joined #ipfs
<tango>
opps I see I am not supposed to be using the peer ID with the cat command..
jamiew has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<Cam-B[m]>
Has anyone here had any luck running ipfs over i2p or tor? I am only finding vagina instructions about onioncat and can't seem to get it working