Recent searches


No recent searches

James  Smyth's Avatar

James Smyth

Joined Apr 15, 2021

·

Last activity Oct 22, 2021

Following

0

Followers

0

Total activity

3

Votes

0

Subscription

1

ACTIVITY OVERVIEW

Latest activity by James Smyth

James Smyth commented,

Community comment Q&A - Help center and community

Hello Sushant, 

Thank you for your response but this still does not work. The image after uploading is still corrupt and can not be viewed.

Do you have a working example?

View comment · Posted Apr 05, 2021 · James Smyth

0

Followers

0

Votes

0

Comments


James Smyth created a post,

Post Q&A - Help center and community
I am trying to upload an attachment (dummy.png), the response is that the attachment has been created as I get a 201 response with a token.
 
I then attach the token to the uploads array before submitting a new ticket. The issue I am having is when I view the ticket, the attachment is corrupted. I am wondering whether it is how i am uploading the attachment in the first place.
 
This is my header below for uploading an attachment. Can someone let me know if there is an issue here?
 
Thank you.
 
const response = await axios.post(`uploads.json?filename=dummy.png`, body, {

baseURL: '/api/v2',

headers: {

common: {

Accept: 'application/json',

'Content-Type': 'image/png',

mode: 'no-cors',

Authorization: `Basic ${process.env.token}`,

},

},

withCredentials: true,

});

Posted Mar 17, 2021 · James Smyth

0

Followers

4

Votes

5

Comments