Content Disposition header in File Download URL

新規投稿

コメント

3件のコメント

  • jmoldow_box

    Content-Disposition is a header that is typically sent from servers to clients. See https://tools.ietf.org/html/rfc6266#section-3 . It is not something that the API accepts from the client request.

     

    If your client wants to use a different name, it is under no obligation to use the true filename / the filename in the response Content-Disposition header. It can do whatever it pleases with the raw file content.

    0
    コメントアクション パーマリンク
  • srikanthvalluri

    Hi,

    Thank you for your reply.

    Could you please let me know the procedure to change the file name while downloading. If you have any sample example that will be more helpful to me.


    Thanks,
    Srikanth

    0
    コメントアクション パーマリンク
  • jmoldow_box

    I'm not certain what language you're using (Java?), but from the code sample you provided, I can see that you are manually calling the API, and you aren't using an SDK to download the file.

     

    Thus, you can download the file to a different location using whatever utilities are built into your language. That is entirely outside of the domain of Box.

     

    If you are using Java, here are some suggestions: http://stackoverflow.com/questions/921262/how-to-download-and-save-a-file-from-internet-using-java . When specifying the target location on your file system, choose whatever name and location that you wish.

    0
    コメントアクション パーマリンク

サインインしてコメントを残してください。