Like Pic8?
well pic8 is a proxy meaning it'll keep the image alive across multiple hosts, his is a host I am bugging to come add his as a host to pic8 he hasn't responded to my pings yet.
Cool, thanks, I think I have it.
In case he does come by I'm going to post some code from my syncbox project that should give him some idea of how to do it.
var config = require('/home/k/.syncboxrc');
var request = require('request');
var jar = request.jar();
var signedin = false;
function login(cb) {
if(signedin) { return cb(); }
var formData = {username:config.username,password:config.password};
request.post({url:'https://js.lifelist.pw',jar,formData},()=>{
signedin = true;
cb();
});
}
function uploadfile(filepath,contentType,cb) {
//This will be using /ppkey/fset
//Therefor we need to log in to the service before we mix the post bodies of a login and a file
var filename = filepath.split('/').pop();
login(()=>{
var formData = {
file:{
value: fs.createReadStream(filepath),
options: {filename,contentType}
}
}
request.post({url:`https://js.lifelist.pw/ppkey/fset/upload/${filename}`,jar,formData},cb);
});
}
Thank you I'm sure it will be appreciated
Interesting. Do I need to login before I upload? Or could I upload as a temporary user?
For the post request, does the filename need to be anything in particular? Or does it not matter. I noticed your js on the site creates a random string for the upload.
Will try writting in python requests.
Hmm, having trouble getting this to work in python..
(post is archived)