Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
DeeG2009
3 years agoExplorer | Level 3
Help with python script uploading images to already created folders
I am looking for some assistance with a script i am trying to get to work to transfer images from a windows server to a dropbox account. For the life of me i cannot get it to stop creating new folder...
Здравко
3 years agoLegendary | Level 20
DeeG2009 wrote:..., ive been messing with this for almost a week now, and thats all it was. "/CPGC/Akron/" is working just fine to the existing folder. ...
As Greg correctly supposed and you skipped to say, you are running team account, not personal. Your initial path is correct and would work for personal account. By default upload path starts from your home folder; for personal account home folder and account root is the same thing, but for team account it's not (and that's where your issue comes from).
DeeG2009 wrote:...
I am assuming it is because when my script runs it will name the images, example: image1.jpg,image2.jpg, etc... and once stopped and started again it starts at 1 again and will not overwrite, Could a timestamp always keep the naming unique ?
...
If you want to overwrite, you have to specify it explicitly. Auto-rename should be specified if desirable too.
DeeG2009 wrote:...
My ultimate goal is to be able to have the script run down a list of lines in a csv instead of just one line, each line in the csv would be for different folders and corresponding data for each image to be uploaded to, but i cant figure out how to have the script run each line in the csv say 10 times, then move on to the next and so on...
As far as I can see, you want to append line(s) to a csv file. Unfortunately, Dropbox doesn't provide such a feature. You have to upload entire file. 🤷 That's it.
DeeG2009
3 years agoExplorer | Level 3
"As far as I can see, you want to append line(s) to a csv file. Unfortunately, Dropbox doesn't provide such a feature. You have to upload entire file. 🤷 That's it."
so i cannot have 50 lines in the csv file to upload to 50 different folders 1 by one, or 10 by 10, etc...? that seems like it is up to the code not drop box. if it can upload to one dropbox folder, it should be able to read a list of destinations right?
- Здравко3 years agoLegendary | Level 20
That what I said is you can't append to a file, nothing more. You can have whatever you want wherever you want. Just every next version should be uploaded anew.
- DeeG20093 years agoExplorer | Level 3
I apologize, i am just not understanding what it is you are trying to say. You have to act like you are talking to a child with me haha.
- Greg-DB3 years ago
Dropbox Community Moderator
DeeG2009 Здравко was pointing out that the Dropbox API does not offer functionality for just appending additional data to an existing file on Dropbox. For example, if there's an existing files uploaded on Dropbox that is 5 bytes long, there isn't a way for your app to upload just an additional 1 byte to make the resulting file 6 bytes long. You would need to upload the whole 6 bytes.
It's not clear to me if you necessarily need such a feature but regardless you of course control the execution flow of the logic in your code. You can write logic to issue 1 or 10 or however many calls to the Dropbox API as/when you need, in whatever order.
About Discuss Dropbox Developer & API
Make connections with other developers
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!