Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

project.py fixes for uploading hosted images #199

Merged
merged 1 commit into from
Oct 25, 2023
Merged

Conversation

reedajohns
Copy link
Collaborator

Two small changes:
(1) When passing in a URL (for hosted image)'self.check_valid_image(path)' doesn't need to run, so we put 'is_hosted' before in the 'or' statement. (2) When pushing to the API for upload, we had 'self.project_name' which doesn't exists. It should be 'project_name' which is calculated a few lines prior.

Description

Hosted image upload was failing. I fixed 2 things:
(1) When passing in a URL (for hosted image)'self.check_valid_image(path)' doesn't need to run, so we put 'is_hosted' before in the 'or' statement. (2) When pushing to the API for upload, we had 'self.project_name' which doesn't exists. It should be 'project_name' which is calculated a few lines prior.

Type of change

  • [ x] Bug fix (non-breaking change which fixes an issue)

How has this change been tested, please provide a testcase or example of how you tested the change?

Running an upload via python for a hosted image:
project.upload("https://jacketmediaco.com/wp-content/uploads/2016/02/GoogleTruck.jpg", hosted_image=True)

Any specific deployment considerations

None. I don't think many people used this because It didnt work.

Docs

I will be updating the roboflow docs: https://docs.roboflow.com/datasets/adding-data/upload-data-from-aws-gcp-and-azure

Two small changes:
(1) When passing in a URL (for hosted image)'self.check_valid_image(path)' doesn't need to run, so we put 'is_hosted' before in the 'or' statement.
(2) When pushing to the API for upload, we had 'self.project_name' which doesn't exists. It should be 'project_name' which is calculated a few lines prior.
Copy link
Collaborator

@tonylampada tonylampada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@reedajohns reedajohns merged commit ed84065 into main Oct 25, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants