dutchcoders / transfer.sh

Easy and fast file sharing from the command-line.
https://github.com/dutchcoders/transfer.sh
MIT License
15.09k stars 1.54k forks source link

Feature Request: Custom Token in URL or Docker Variables #544

Closed SSivian closed 1 year ago

SSivian commented 1 year ago

We are planning to use transfer.sh for transferring data between legacy systems, and it would be useful for us to be able to force the token during upload with a custom string in order to control the generation of the download/upload/delete URL.

Example: curl --upload-file hello.txt https://server/[customtoken[/hello.txt

Thanks

aspacca commented 1 year ago

@SSivian I see the value but it could be abused to overwrite existing content

I would rather suggest alternative migration method.

if I got it right you have an existing legacy transfer.sh self-managed instance and want to move the content uploaded to a new self-managed instance, is it correct?

what kind of storage do you use for both instances?

SSivian commented 1 year ago

Divido la risposta in 2 ( Italiano per noi e Inglese per tutti gli altri ).

Abbiamo la necessità di sincronizzare due sistemi legacy tra di loro senza usare FTP ma sfruttando "curl/wget" per inviare una serie di files csv attraverso internet. stavamo valutendo transfer.sh e per il nostro caso specifico sarebbe molto comodo impostare in maniera fissa il Token già in fase di upload. altrimenti dovremmo inciare in qualche modo tale url dal server di origine a quello di destinazione per recuperare poi i files. Ci fosse il modo di forzarlo ci permetterebbe di usare transfer.sh in maniera totalmente automatica.

Pensavo a un parametro in pù nella funzione token dove se valorizzato non usa la generazione automatica ma usa quello imposto.

Più chiaro?


We have the need to synchronize two legacy systems with each other without using FTP but exploiting "curl/wget" to send a set of csv files through the internet. we were evaluating transfer.sh and for our specific case it would be very convenient to set in a fixed way the Token already in the upload phase. otherwise we would have to incite somehow that url from the source server to the destination server to retrieve then the files. There was a way to force it would allow us to use transfer.sh in a totally automatic way.

I was thinking of an extra parameter in the token function where if valued it does not use automatic generation but uses the imposed one. Any more clear?

aspacca commented 1 year ago

@SSivian unluckily the scenario you describe is some kind of unintended usage of transfer.sh

given the feature needed for your scenario would have a big impact (see mainly possibility to abuse overwriting content) I won't be able to implement it, I'm sorry

you can still with some script use transfer.sh in a automatic way, just instead of feeding the token to transfer.sh reading it back and output a list of url to fetch on the receiving system