machristie commented on a change in pull request #52:
URL: 
https://github.com/apache/airavata-django-portal/pull/52#discussion_r536149053



##########
File path: django_airavata/apps/api/serializers.py
##########
@@ -513,6 +515,13 @@ def get_isInputFileUpload(self, data_product):
         request = self.context['request']
         return user_storage.is_input_file(request, data_product)
 
+    def get_path(self, data_product):
+        """Getter for path field."""
+        if len(data_product.replicaLocations) > 0:
+            return re.sub(r'.*/tmp/[^/]*/', "", 
data_product.replicaLocations[0].filePath)

Review comment:
       Yeah, see my other comment below. Essentially, if we have a data product 
URI, that should be all that the API needs. The API shouldn't need the path 
because the path can be determined from the data product URI. I'll create an 
updated `user_storage.update_file_content` function in the SDK that you can use 
in DataProductView.put()




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to