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

where in the response of an upload do I get the details to retrieve the file #63

Open
dagda1 opened this issue Feb 6, 2019 · 3 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@dagda1
Copy link

dagda1 commented Feb 6, 2019

Which service(blob, file, queue, table) does this issue concern?

blob

Which version of the SDK was used?

10.3

What's the Node.js/Browser version?

8.11.1

What problem was encountered?

I have a backing database table that stores additional searchable metadata about each file that gets uploaded into azure storage, such as description, name and other details. There will also be a pseudo directory structure which is all very normal stuff for document management.

I am making a call to uploadBrowserDataToBlockBlob but I cannot see anything in the response that will help me later retrieve the file later.

My code looks like this:

response = await Azure.uploadBrowserDataToBlockBlob(Azure.Aborter.none, file, blockBlobURL, options);

but I can't see anything in that response that will let me later uniquely get this file, unless the blob name is the only thing that I have.

In which case am I best to generate some unique name for the identifier?

Steps to reproduce the issue?

Have you found a mitigation/solution?

@donniekerr
Copy link

I'm looking for same thing. I'd like to get the url of the uploaded file back as confirmation that it is there and the link works. But, I don't see a response object in the documentation.
Thanks,
Donnie

@XiaoningLiu
Copy link
Member

@dagda1 @donniekerr Every response has a inner _response property to get original request urls.

response = await Azure.uploadBrowserDataToBlockBlob(Azure.Aborter.none, file, blockBlobURL, options);
console.log(response._response.request.url);

@XiaoningLiu XiaoningLiu self-assigned this Feb 14, 2019
@XiaoningLiu XiaoningLiu added the question Further information is requested label Feb 14, 2019
@XiaoningLiu
Copy link
Member

@seguler Do you know is the correct person in doc team to improve the document generation?

This is the original code:

/**
 * Type for uploadFileToBlockBlob, uploadStreamToBlockBlob and uploadBrowserDateToBlockBlob.
 *
 * @export
 */
export type BlobUploadCommonResponse = Models.BlockBlobUploadHeaders & {
  /**
   * The underlying HTTP response.
   *
   * @type {HttpResponse}
   * @memberof IBlobUploadCommonResponse
   */
  _response: HttpResponse;
};

And this is the document generated which missing _response

image

@XiaoningLiu XiaoningLiu added the enhancement New feature or request label May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants