tmpim / shitty.dl

Heavyweight featurecreep file hosting server in node.js
8 stars 3 forks source link

ShareX configuration generator #16

Closed Lemmmy closed 5 years ago

Lemmmy commented 6 years ago

Either generate a ShareX config and console.log it on start, or have a page which has the user type in the password, validates it and then generates it

Wojbie commented 6 years ago

I would suggest generating 3 configs instead of one. One for normal upload. One for pastes and one for shortcuts. Will have to look into if import allows you to import multiple of those at time.

Also could just have it generate one on startup to "sharex.config" file and just ask user to replace "SHITTYPASSWORDHERE". that way there is no password in cleartext with some luck.

Wojbie commented 6 years ago

Ok so it has to be 3 separate files after all sadly. So it will require 3 Now that i think about it user don't even have to edit files. Just ask them to change the SHITTYPASSWORDHERE value after importing. Here are 3 basic one i am suggesting:

{
  "Name": "wojbie.net images and files",
  "DestinationType": "ImageUploader, FileUploader",
  "RequestURL": "https://wojbie.net/i/upload",
  "FileFormName": "file",
  "Arguments": {
    "password": "SHITTYPASSWORDHERE"
  },
  "URL": "$json:.url$",
  "DeletionURL": "$json:.deleteUrl$"
}
{
  "Name": "wojbie.net text",
  "DestinationType": "TextUploader",
  "RequestURL": "https://wojbie.net/i/upload?paste=true",
  "FileFormName": "file",
  "Arguments": {
    "password": "SHITTYPASSWORDHERE"
  },
  "URL": "$json:.url$",
  "DeletionURL": "$json:.deleteUrl$"
}
{
  "Name": "wojbie.net ShortUrl",
  "DestinationType": "URLShortener",
  "RequestURL": "https://wojbie.net/i/upload",
  "Arguments": {
    "password": "SHITTYPASSWORDHERE",
    "link": "$input$"
  },
  "URL": "$json:.url$",
  "DeletionURL": "$json:.deleteUrl$"
}

Also after the imports and changing passwords user will have to change the custom uploader fields to similiar to this (URL Sharing is ignred here) : sharex_2018-05-20_13-58-42

So in the end it looks like even with autogenerating of settings it will still require a bit of tutorial to get pepole working with it properly.

EDIT: Also.. now that i think about - similiar idea would be to have it generate a curl script and similiar while at it.

Lignum commented 6 years ago

I think having a page for this would be much nicer, since popular hosts running the software like shitty.download itself have multiple users, not all of whom have access to the server. It should only be accessible once logged in, that way we can just conveniently insert the password into the config safely.

Lemmmy commented 6 years ago

The reason wojbie didn't like the idea of a page is becuase he didn't think it'd fit anywhere on the site, but we recently established we could just add another row of buttons

Wojbie commented 6 years ago

I still don't like idea of another row of buttons but i can't squeeze another one without it looking way too busy ;D

Wojbie commented 6 years ago

Got started on idea. Dunno how to make navigation work nice with another page, But it works out of box if you manualy navigate to /misc page. The field on top allows user to change SHITTYPASSWORDHERE to the password they want to use on all configs. obraz

If someone could throw examples of similar configs in other file uploading programs / utilities / bash scripts we could make it into useful page.

Lemmmy commented 6 years ago

perhaps wrap this in div.action.input to join all the elements up?

Wojbie commented 6 years ago

Sure. Will do in next worthwhile commit. Hmm I just realized this page don't need to be in menu. In can just be linked from inside the upload page.

Lemmmy commented 6 years ago

great idea!

Wojbie commented 6 years ago

I propose we leave this issue open for people to post example configs they would like to see added to configs page. Not like there will be any.

EDIT: Lignum is right too.

Lignum commented 6 years ago

I propose we leave this issue open for people to post example configs they would like to see added to configs page. Not like there will be any.

I think these should be in their own issues. It would make it seem like we still don't have a ShareX configuration generator otherwise.