Hi all, Thanks for hosting this community. I have ...
# help
a
Hi all, Thanks for hosting this community. I have a question about LakeFS API in Java (Scala), I am using the following simple function to generate presignedURL:
Copy code
statObject(repoName, commitHash, filePath).presign(true).execute().getPhysicalAddress
But it does not support filename (content disposition header), I went through full library io.lakefs but there is no option to add headers to presigned URL, the only option is to use S3 API and use LakeFS directly which is not standard. Is there any way that LakeFS add filename to presigned URL coming from MinIO?
a
Hi Ali, and welcome to the lake! IIUC you'd like to receive a presigned URL which would cause a download into a particular filename. AFAIK you're right: there is no support in the API to do this. Personally I'm not even sure what the edge cares would be to add this on top of statObject, given that it might be used without presigned URLs. Could you please open an issue on the repository?
a
Hi Ariel, thanks for your response, I created an issue, I am from Apache Texera team and we closed one of our PRs to wait for your update.
lakefs 1
I also want to clarify what I need to do so maybe LakeFS has an option that Im missing. To enable browser native downloader, I need to pass pre signed url to it directly, then browser send the request and in response header get filename, all I want to do is to use browser native download manager but I can’t pass filename to it. If LakeFS provide other options, please let me know.
đź‘€ 1
a
Hi @Ali Risheh, Thanks for opening the issue! There are some obvious product-side considerations here. Will you be generating the presigned link from an application in the browser, or from a separate app?
a
happy thanksgiving @Ariel Shaqed (Scolnicov) , the presign URL is generated from an application written in Scala and uses LakeFS Client library and MinIO. The core function in our code (line 194) is a function from LakeFS object API: def getFilePresignedUrl(repoName: String, commitHash: String, filePath: String): String = { objectsApi.statObject(repoName, commitHash, filePath).presign(true).execute().getPhysicalAddress } This function doesn’t accept filename which should later added to response header so browser know the name. Currently, we store the byte stream into a blob in frontend and then give it name and pass it to browser to download, unfortunately this way browser doesn’t show progress.
a
Yeah, it's a good change. Unfortunately we probably don't have any current bandwidth to do this.
👍 1