How to remove or change the path in postman documentation - postman

Click to open image
In POSTMAN documentation I have a post request with uploading image(form-data) and I need to remove the path of files in my computer
I have the path like this:
/C:/Users/user/Downloads/user.avatar.205.200 (1).jpg
And I need to remove or change this:
/C:/Users/user/Downloads

Related

AWS S3 - automatically change response header

Our team is building a web app that allows users to download video files. We currently host our files on AWS S3, but since our site doesn't reside on AWS, we can't use <a href="blah"> to prompt download. If we use that html element, users simply get redirected to a video player - which is fine, but Safari on mobile doesn't allow for users to download the video file via the video player.
We found that manually setting the file's content disposition to attachment on S3 works, but we have not found a way to automate that. We tried adding a content-disposition: attachment key-value pairing in our payload, which works, but adds a "User defined" meta data in the form of x-amz-meta-content-disposition, which doesn't work as the file could not be downloaded as an attachment. It seems only "System defined" works.
Has anyone ever encountered this issue before and found a workaround?
see screenshot for what I'm referencing
You can set the content disposition when the file is created.
This is done by uploading the file via a presigned url.
See https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html for details on the presigned urls.
Alternatively you can use a presigned url to return to get the file from S3 and override the content disposition header on the GET request.

How to force download text files from AWS S3 bucket

I have a test.txt file stored in an S3 bucket and when i click on "Open", i want it to get downloaded but it is opening in the browser itself. I have tried setting Content-disposition to attachment but it did not work. Is there any way to force download text and json files from S3?
Thanks in advance.
When you click Open in the S3 console, it sends response-content-disposition=inline to S3 which overwrites whatever Content-Disposition set on the object to inline. Content-Disposition: inline indicates that the content of this file can be displayed inside the Web page. This is why setting Content-Disposition won't work in this case.
If you need to download the file (instead of opening it in the web page) from the S3 console, you can either
click Open
on the new popup page, right click and choose Save as ...
Or
click Download as in the S3 web console

Coldfusion cfcontent doesn't take me back to my calling page

I'm calling this from a .cfm page to download the excel file and I have added a loading mask to prevent further clicks on the download button, however, once after downloading it doesn't go back to my .cfm page and never stops the loading masks.
cfheader( name="Content-Disposition", value="attachment; filename=#fileName#" );
cfcontent( type="application/vnd.ms-excel", variable="#spreadsheetReadBinary(spreadsheet)#", reset="true" );
Any help would be appreciated. Thanks!
You're not going to get to any redirect command when using cfcontent. The response from that command is based on the mime-type of the requested content.
application/json
application/xml
application/vnd.ms-excel
You don't get anything other than that content. In your case, once the file is downloaded, then no more CFML code is run on the page.
If your desired workflow is:
Click a link
Download file
Redirect once the file is downloaded.
then you should
Click a link that triggers a fetch request (or jQuery.ajax())
The download will be done via a separate page.
The fetch can redirect to another page once the file is downloaded.
Odds are, you don't need to actually redirect, you just want the file to download
(Sorry, this has been sitting not posted for a few days.)

Upload document in postman

Iam facing some challanges by uploading a document in postman. The steps how to upload a document by the body and choosing form-data then you add file and change it to file instead of tekst. This goes fine and when I excute the call it goes through. But when I close the postman call and try to open it again and excuted it gives me 400 error code. When I look into the body and espacially by the form-data it shows that no file is choosing. So postman is not saving the path where the document is located. In this case I have to added everytime when I want to run the request.
The quastion is how do I fix this problem. Postman is not saving the location of the document.
Thanks in advance

GCP Storage: url encoded Object Path added to Object Name

I have the following folder structure in my bucket:
Structure: Bucket-Name/YEAR/Folder/Objects
Example Path: mybucket/2018/myEXEs/file.exe
Issue: When I try to download an object (file.exe) from example path above by clicking on the EXE, the filename that appears in the download dialog box looks like this:
"2018%2FmyEXEs%2Ffile.exe"
You have to strip the URL encoded path every time and this is an inconvenience if you do not want to make the URL public.
Observation:
It appears the storage browser adds bucket path to the filename and that gets encoded to replace '/'.
This does not happen when you download the object using public URL.
Question:
Is there a way to strip the URL encoded path from filename?
There is a feature request in the public tracker for this. As mentioned in the same link, there is a workaround by setting the filename in the Content-Disposition metadata of the files. To do it, go to Cloud Storage, edit metadata of a file and, in Content-Disposition field, add:
attachment; filename="filename"
The the only inconvenient with this workaround is that you have to set filenames in all the download files's metadatas.