andreafabrizi / Dropbox-Uploader

Dropbox Uploader is a BASH script which can be used to upload, download, list or delete files from Dropbox, an online file sharing, synchronization and backup service.
https://www.andreafabrizi.it/2016/01/01/Dropbox-Uploader/
GNU General Public License v3.0
6.56k stars 1.08k forks source link

share not working #592

Open aarsenca opened 6 months ago

aarsenca commented 6 months ago

I first want to thank you for a great script. I have been using it since April 2023.

Today, for the first time, I had to use the "share" command right after uploading a file. The two operations are in a script to upload a file and mail the shared link.

My issue is exacly the same as reported in August 2021 (536). Actually, while "share" does not work in my script, it does work AFTER I display the shared link in the Dropbox app (android in this case) by clicking on the file and then Copy Link in the drop-down menu.

So it looks like the link does not exist until it is generated by my actions in the app, and only then does the "share" command properly return the link. I suppose it means the issue is with the moment when the link becomes available for the "share" command to grab it.

Do you have any suggestions to make it work in a practical way?

Thanks!

aarsenca commented 6 months ago

So my solution for the moment is as follows. Not ideal but better than nothing.

  1. Upload the file with the script
  2. Pause the script
  3. In the Dropbox app, generate the link (click on file, click on Copy Link in dropdown menu)
  4. Resume the script by pressing a key
  5. Grab the shared link with the script
  6. Email the link with the script

Ideally, it would be only one step: run the script.

MohamedRejeb commented 6 months ago

You need to add share permission in dropbox console and config the bash script again with new keys

aarsenca commented 6 months ago

I was pretty sure I had done this before submitting the issue, but I did it again and it worked. I already had the permissions (sharing.read and sharing.write) enabled. I renamed the .dropbox_uploader config file and ran it as the first time. I entered the config data (access keys and code), uploaded a file and then grabbed the link without having to do anything else. Thank you for the hint.