File issueshttps://community.opengroup.org/osdu/platform/system/file/-/issues2023-08-08T16:30:43Zhttps://community.opengroup.org/osdu/platform/system/file/-/issues/89Unable to download the file2023-08-08T16:30:43ZSachin JaiswalUnable to download the file**Problem**
File download fails if file name contains the special character like ","
**Steps to reproduce**
- Generate a signedurl to upload a file (tesing,copy).
- Upload a file
- create a file metadata and use same filename (tesing,...**Problem**
File download fails if file name contains the special character like ","
**Steps to reproduce**
- Generate a signedurl to upload a file (tesing,copy).
- Upload a file
- create a file metadata and use same filename (tesing,copy)
- Generate a signedurl to download a file
- Copy and paste the signedurl in browser
**Error notice on bowser** - `<storage-url> sent an invalid response. ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION `
**Proposed Solutions**
- File service - wrap quotes to file name before passing it to OS Core Lib Azure **OR**
- OS Core Lib Azure - Below changes in [BlobStore class](https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/blob/master/src/main/java/org/opengroup/osdu/azure/blobstorage/BlobStore.java#:~:text=581-%2cblobServiceSasSignatureValues.setContentDisposition%28%22attachment%3b%20filename%3D%20%22%20%2B%20fileName%29%3b%2c-582) of OS Core Lib Azure repo.
`blobServiceSasSignatureValues.setContentDisposition("attachment; filename=\"" + fileName + "\"")`;https://community.opengroup.org/osdu/platform/system/file/-/issues/86/api/file/v2/files bugs2023-09-26T14:22:03ZShane Hutchins/api/file/v2/files bugsReceived a response with 5xx status code: 500. I expected a 404 from these APIs but got 500 Internal Server Error.
Run this curl command to reproduce this failure:
GET /api/file/v2/files/%0A/metadata:
curl -X GET -H 'Authorization...Received a response with 5xx status code: 500. I expected a 404 from these APIs but got 500 Internal Server Error.
Run this curl command to reproduce this failure:
GET /api/file/v2/files/%0A/metadata:
curl -X GET -H 'Authorization: Bearer TOKEN' -H 'data-partition-id: osdu' https://osdu.r3m18.preshiptesting.osdu.aws/api/file/v2/files/%0A/metadata
DELETE /api/file/v2/files/%3B/metadata:
curl -X DELETE -H 'Authorization: Bearer TOKEN' -H 'data-partition-id: osdu' https://osdu.r3m18.preshiptesting.osdu.aws/api/file/v2/files/%3B/metadata
GET /api/file/v2/files/%3B/downloadURL:
curl -X GET -H 'Authorization: Bearer TOKEN' -H 'data-partition-id: osdu' https://osdu.r3m18.preshiptesting.osdu.aws/api/file/v2/files/%3B/downloadURL
Confirmed this issue on AWS and Azure.
curl -X GET -H 'Authorization: Bearer TOKEN' -H 'Cookie: JSESSIONID=SESSIONIDHERE' -H 'data-partition-id: opendes' https://osdu-ship.msft-osdu-test.org/api/file/v2/files/%0A/metadatahttps://community.opengroup.org/osdu/platform/system/file/-/issues/85Duplicate PreloadFilePath value on ingestion of File.Generics2023-06-16T13:17:04ZGorm-Erik AarsheimDuplicate PreloadFilePath value on ingestion of File.GenericsWhen ingesting File.Generics into OSDU, we are using the {OSDU_BASE_URL}/file/v2/files/metadata endpoint to create the File.Generic. In the body we are setting the PreloadFilePath value on data.DatasetProperties.FileSourceInfo.PreloadFil...When ingesting File.Generics into OSDU, we are using the {OSDU_BASE_URL}/file/v2/files/metadata endpoint to create the File.Generic. In the body we are setting the PreloadFilePath value on data.DatasetProperties.FileSourceInfo.PreloadFilePath as described in the schema. The file is created successfully but when we read out the record from Storage API there is a duplicate value for PreloadFilePath where it has both 'PreloadFilePath' with a capital 'P', and 'preloadFilePath' with a non-capital 'P'. We've tried to ingest a file with a non-capital 'preloadFilePath' as well, but it still comes out with both values when reading it back. We have also tried generating the File.Generic raw json object from our code and using this to create it directly from the metadata endpoint in Postman to disclose that our code is somehow meddeling with the object. This also comes out with the same result. It's also worth mentioning that we are running OSDU through Microsoft ADME.Om Prakash GuptaOm Prakash Guptahttps://community.opengroup.org/osdu/platform/system/file/-/issues/62POST /metadata endpoint returns 500 error when Blob Not Found2022-09-27T11:52:47ZTsvetelina IvanovaPOST /metadata endpoint returns 500 error when Blob Not FoundPOST /metadata endpoint returns a BlobStorageExcepiton with message "Error occurred while creating file metadata Status code 404, "<?xml version="1.0" encoding="utf-8"?><Error><Code>BlobNotFound</Code><Message>The specified blob does no...POST /metadata endpoint returns a BlobStorageExcepiton with message "Error occurred while creating file metadata Status code 404, "<?xml version="1.0" encoding="utf-8"?><Error><Code>BlobNotFound</Code><Message>The specified blob does not exist._RequestId:f60ebd44-b01e-0012-532e-3236bf000000_Time:2022-03-07T14:23:07.9454432Z</Message></Error>" Status code 404, "<?xml version="1.0" encoding="utf-8"?><Error><Code>BlobNotFound</Code><Message>The specified blob does not exist.
RequestId:f60ebd44-b01e-0012-532e-3236bf000000
Time:2022-03-07T14:23:07.9454432Z</Message></Error>"" as a 500 Internal Server Error when calling deleteFile method to delete file from the blob storage.
The file is copied successfully from staging to the persistent area, but the delete of the file from staging fails with "The specified blob does not exist".
For exception logs see the attached file:
[File_Service_Azure_Logs_-_BlobStorageException.csv](/uploads/2cfc5a0baf2616fb456791ce8412babb/File_Service_Azure_Logs_-_BlobStorageException.csv)https://community.opengroup.org/osdu/platform/system/file/-/issues/38GET /DownloadURL api to support generating signedURL that can be accessible f...2022-09-29T13:41:08ZOrsu AkhilGET /DownloadURL api to support generating signedURL that can be accessible from select IP address.The /DownloadURL api would return signedURL to access file stored in persistent location based on File Metadata id .
Having the feature wherein User can specify the range of IP address , only through which when signedURL is used would re...The /DownloadURL api would return signedURL to access file stored in persistent location based on File Metadata id .
Having the feature wherein User can specify the range of IP address , only through which when signedURL is used would result in access to the file in persistent location would be good. This IP address or range of IP address can be passed by User via GET query Parameter in the api specification.
Supporting this sort of customization in generated signed url is possible in Azure Cloud and would like to know about this in other cloud providers , if is feasible in others as well then could come up with implementation supporting this feature.Orsu AkhilParesh BehedeOrsu Akhil