|
public header: string = '';
//Based on your application logic, you can update the token values
public ngOnInit(): void {
api._restApi._api._options.endpoints[0].custom_header().then(
data => {
this.header = data.Authorization;
});
}
…
beforeSend = (args) => {
var token = this.header;
args.ajaxSettings.beforeSend = ($args) => {
$args.httpRequest.setRequestHeader('Authorization', token);
};
} |
2021-05-26T15:25:47.081-04:00 | File upload start for : tomato.png | |
2021-05-26T15:25:47.081-04:00 | name tomato.png | |
2021-05-26T15:25:47.081-04:00 | fullName /tmp/tomato.png | |
2021-05-26T15:25:47.081-04:00 | incoming file size90371 | |
2021-05-26T15:25:47.082-04:00 | new file size after writing to temp file 90371 | |
2021-05-26T15:25:47.181-04:00 | file upload complete for tomato.png : 90371 bytes |
2021-05-26T16:59:28.575-04:00 | File upload start for : TestFile.rtf | |
2021-05-26T16:59:28.575-04:00 | name TestFile.rtf | |
2021-05-26T16:59:28.575-04:00 | fullName /tmp/TestFile.rtf | |
2021-05-26T16:59:28.575-04:00 | incoming file size378 | |
2021-05-26T16:59:28.575-04:00 | new file size after writing to temp file 378 | |
2021-05-26T16:59:28.759-04:00 | file upload complete for TestFile.rtf : 378 bytes |
|
Mode |
Image File |
Text File |
|
Normal Mode |
Original size - 43.7 KB (43,700 bytes)
Uploaded size - 43.8 KB (43,800 bytes) |
Original size - 22.6 KB (22,600 bytes)
Uploaded size - 22.7 KB (22,700 bytes)
|
|
Production Mode |
Original size - 43.7 KB (43,700 bytes)
Uploaded size - 43.8 KB (43,800 bytes) |
Original size - 22.6 KB (22,600 bytes)
Uploaded size - 22.7 KB (22,700 bytes) |
Go to
"API" -> {YourAPI} -> "Settings"
There you will find "Binary Media Types" section.
Add following media type:
multipart/form-data
Save your changes.
Then Go to "Resources" -> "proxy method"(eg. "ANY") -> "Method Request" -> "HTTP Request Headers" and add following headers "Content-Type", "Accept".
Finally deploy your api.
REF: https://stackoverflow.com/questions/31645205/how-to-upload-file-to-lambda-function-or-api-gateway
One final question:
1) Is there a way to override show image dialog box on double click? Basically, instead of showing built in image dialog box when we double click on the image, can we show a custom dialog? If not, can I disable the double click event which shows a image dialog box?
Thanks,
Samir
|
beforePopupOpen(args) {
if (args.popupName == 'Image Preview') {
//Cancel the default image preview
args.cancel = true;
}
} |