Follow

anypaste.xyz website complete. It's a smart command line file sharing tool I've been working on for a while, making it really easy to share any type of file. Check it out!

@markasoftware I am interested in Anypaste but it would not work on Mac.

$ ./anypaste ~/Desktop/lenna.jpg
readlink: illegal option -- f
usage: readlink [-n] [file ...]
Current file: /Users/USERNAME/Desktop/lenna.jpg
./anypaste: line 11: : No such file or directory
./anypaste: line 11: : No such file or directory
Attempting to upload with plugin 'fileio'
Warning: Illegally formatted content-type field!
curl: option -: is badly used here
.
.
.

@vividtone Oh no, I used a GNU extension! It's a pretty simple fix, but before I commit it, could you verify everything else works by trying to upload stdin, for eg `./anypaste < lenna.jpg`?

@markasoftware Sure, I will gladly cooperate for you. Could you let me know how I can get dev version of Anypaste?

@vividtone The dev version is pushed to anypaste.xyz/sh automatically every 30 minutes, for better or for worse :) it is live right now

And thanks for your help!

@vividtone Could you try running `file --mime ~/Desktop/lenna.jpg` and `file -i ~/Desktop/lenna.jpg` and tell me the output of both? It seems like the MIME type detection is a bit different across systems.

@markasoftware

$ file --mime lenna.jpg
lenna.jpg: image/jpeg; charset=binary
$ file -i lenna.jpg
lenna.jpg: regular file

@vividtone Ok, I guess `file` on macOS does not use the same short-options as Linux does, but the long-options seem to be the same. Could you try the updated script now?

@markasoftware Thank you for improving anypaste! Now it works fine!

$ ./anypaste ~/Desktop/lenna.jpg
Current file: /Users/USERNAME/Desktop/lenna.jpg
Attempting to upload with plugin 'vgyme'
######################################################################## 100.0%

Link: vgy.me/4QYwCn
Direct Link: vgy.me/4QYwCn.jpg
Delete: vgy.me/delete/QTVUsA5ZfbirIbzs

Upload complete.
All files processed. Have a nice day!

@vividtone Yay! I hope you enjoy it!

and thanks for the help, I can't really afford a Mac just for testing out shell scripts and hackintoshes don't play well with AMD

Sign in to participate in the conversation
toot.love

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!