We're making changes to the Community, so you may have received some notifications - thanks for your patience and welcome back. Learn more here.
Forum Discussion
ms97
2 years agoExplorer | Level 3
Error (415) from Python files_upload API
Hello, I am trying to write a python script to automatically store an excel file in dropbox. My excel file is created from turning dataframes into excel sheets. This file has 5 sheets with a diffe...
Greg-DB
Dropbox Staff
ms97 Здравко is correct; your output shows that your file upload was empty, which is why the Dropbox web site was not able to show the contents. You'll need to debug your integration to make sure you correctly upload the non-empty data.
credentially-dev-team
2 years agoNew member | Level 2
I am getting a similar response when just switching the folder I am uploading to:
FileMetadata(client_modified=datetime.datetime(2023, 8, 10, 16, 22, 13), content_hash='e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', export_info=NOT_SET, file_lock_info=NOT_SET, has_explicit_shared_members=NOT_SET, id='id:MfcxP9MMQyMAAAAAAAAAHg', is_downloadable=True, media_info=NOT_SET, name='test.zip', parent_shared_folder_id=NOT_SET, path_display='/Folder2/test.zip', path_lower='/folder2/test.zip', preview_url=NOT_SET, property_groups=NOT_SET, rev='0160293ffb9dc8f0000000104e641f1', server_modified=datetime.datetime(2023, 8, 10, 16, 22, 14), sharing_info=NOT_SET, size=0, symlink_info=NOT_SET)
So my problem has nothing to do with the file itself because it has been uploaded into another folder successfully:
FileMetadata(client_modified=datetime.datetime(2023, 8, 10, 16, 28, 4), content_hash='e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', export_info=NOT_SET, file_lock_info=NOT_SET, has_explicit_shared_members=NOT_SET, id='id:qzdXOVVbA8AAAAAAAAUJ_w', is_downloadable=True, media_info=NOT_SET, name='test.zip', parent_shared_folder_id='4391826353', path_display='/Folder1/test.zip', path_lower='/folder1/test.zip', preview_url=NOT_SET, property_groups=NOT_SET, rev='016029414a2b7250000000105c5f3b1', server_modified=datetime.datetime(2023, 8, 10, 16, 28, 4), sharing_info=FileSharingInfo(modified_by='dbid:AAB_CoHtiOlASmyE9l1g_5pdrDuPG1s2CIQ', parent_shared_folder_id='4391826353', read_only=False), size=0, symlink_info=NOT_SET)
What do you think it could be?
- Greg-DB2 years agoDropbox Staff
credentially-dev-team Both samples you shared here show 'size=0', meaning that both files were uploaded with empty contents. Please check your upload code to make sure you're uploading the non-empty contents that you expect for the files.
- Здравко2 years agoLegendary | Level 20
credentially-dev-team wrote:...
FileMetadata(..., size=0, ...)
So my problem has nothing to do with the file itself because it has been uploaded into another folder successfully:
FileMetadata(..., size=0, ...)
What do you think it could be?
I think you cannot read those empty archives content in both cases. 🙋
- credentially-dev-team2 years agoNew member | Level 2
@Здравко
Yes, but still. Via UI I can see the file in Folder1 so it turns out empty files can be uploaded 🙂
- Greg-DB2 years agoDropbox Staff
credentially-dev-team Dropbox allows you to upload empty files (that is, files with size of 0), but empty files are not valid zip files.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,875 PostsLatest Activity: 5 hours agoIf 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 or Facebook.
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!