reconftw icon indicating copy to clipboard operation
reconftw copied to clipboard

Use notify directly for zip file uploads

Open nicoandmee opened this issue 1 year ago • 4 comments

The problem: Any files over 50MB (for telegram) and a measly 8MB (for discord) do not get uploaded. For me at least, this is an annoyance as I like to be able to review the results from whatever machine I happen to be at.

All this does is use notify directly rather than parsing out the attributes from the config file. Perhaps there is a reason that is being done that I have not considered. But using this approach and https://transfer.sh/ notify will send out the URL to all the configured receivers once the upload completes. There is no size limit that I am aware of- I am uploading 200-300MB zip files without any issue.

Caveat: File will be deleted after 2 weeks. To me that seems entirely appropriate. Humbly submitted for your @six2dez consideration.

nicoandmee avatar Sep 17 '22 21:09 nicoandmee

Hey! Thanks for the PR! I was thinking about the issue and what I will do is detect if the zip file is bigger than 8MB -> then send over transfer.sh, otherwise send over Telegram/Discord/Slack.

If you think you are able to implement this fix then go for it, if not I will do it soon by myself, meanwhile I will keep this PR open :)

six2dez avatar Sep 18 '22 16:09 six2dez

@six2dez Would love to give it a shot! 👍 Will update this PR when ready in next day or two

nicoandmee avatar Sep 19 '22 13:09 nicoandmee

WDYT @six2dez ? I suppose we could check slack and discord separately since the file upload size limits differ for each, but that feels kinda unnecessary since the transfer.sh link will go to both anyway :thinking: Has been running on my VPS for awhile now with no issues (there did seem to be an issue using curl --upload-file though, which is why I brought in the function from https://transfer.sh/).

nicoandmee avatar Sep 20 '22 16:09 nicoandmee

@six2dez I spotted another "issue" that maybe would be worth addressing here- currently the .zip is the whole directory tree like, for example: /home/op/reconftw-data/mysite.com/. To me this is not idea, I would rather just have the mysite.com be at the root of the archive.

To that end I made a change based on what I read about how zip behaves and subshells. Confirmed it does seem to work as expected

nicoandmee avatar Sep 21 '22 13:09 nicoandmee