WelcomeUser Guide
ToSPrivacyCanary
DonateBugsLicense

©2025 Poal.co

1.1K

(post is archived)

[–] 2 pts

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.

[–] 1 pt

Cool, thanks, I think I have it.

[–] 1 pt (edited )

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);
 });
}
[–] 1 pt

Thank you I'm sure it will be appreciated

[–] [deleted] 1 pt (edited )

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..

[–] 0 pt (edited )

So I'm not sure what my policy is going to be with temp users and large data users. It probably would be better to use an actual account. So it's pretty easy to script. The only slightly tricky part is keeping cookies between requests.

I almost regret posting that code because it can be summed up so easily.

Login with post form names..{username,password}
Upload image with post form name..{file}

Post to '/ppkey/fset/{identifier}'
Get image at '/ppkey/fget/{username}/{identifier}'
By convention that identifier usually leads with an app name so a user can use multiple apps without a problem.
You might not need to do that but it's your call.

ppkey means public
pkey means for other logged in users
skey means only you can see it.

fset means set a file associated with a key
fget means get a file associated with a key
set means set a string associated with a key
get means get a string associated with a key
fhash means get the sha1 hash of a file.

For pkey and ppkey a user is a part of the get url because we need to know which user's content we are getting.