#how upload file from a slash command

1 messages · Page 1 of 1 (latest)

vocal lilyBOT
#

Hey! Once your issue is solved, press the button below to close this thread!

tranquil venture
#

I suggest taking the url and sending that instead as then you dont have to worry about the upload taking too long or the file being too big

#

You can download the file and then evaluate the size and other parameters with stat() or other tools

finite aspen
#

you can make a head request to view the content-size header

tranquil venture
#

You can do so in your system

#

Idk there are prob tools for that too

#

Too much work???

#

Lemme check

#

os.rename

#

Uhh

finite aspen
#

you can use ./ for relative paths

#

You could truncate the string?

#

Honestly, I'm a bit confused of what you're trying to do. Examples would be nice

tranquil venture
#

Yeah

finite aspen
#

you could split the string based on _ and select the last item in the list

tranquil venture
#

Pretty sure you can save the file in your memory and then rename it there

#

Try first loading it into your memory and then renaming it there

#

Its stored in the root then