Not able to view the upload document preview in page
Asked by ramesh kumar:

Hi Team,  
Asa part of my work I have to upload csv files, text files and some times images. I am able to upload to the page but I got 2 issues now  

1. I want to add the images to one section of the page and csv into another section of the page but I am failing it to tag attachments to intended section. Can you please help me to insert attachments into desired section of the page  

2. I am able to push attachments to the page but not able to view their preview in page. what should I do to get a preview of attachments  

Any help is much appriciated  

Thanks in advance


Answers:
author: Alex Koxaras _Relational_
body: Hi [@ramesh kumar](/t5/user/viewprofilepage/user-id/4808100)

Can you please post a screenshot?

comments: author: ramesh kumar
body: ![Screenshot 2022-09-13 at 13.47.19.png](https://community.atlassian.com/t5/image/serverpage/image-id/215718i2F1969152B8AA79B/image-size/large?v=v2&px=999 "Screenshot 2022-09-13 at 13.47.19.png")![Screenshot 2022-09-13 at 13.47.58.png](https://community.atlassian.com/t5/image/serverpage/image-id/215719iBA4D77E27800BF58/image-size/large?v=v2&px=999 "Screenshot 2022-09-13 at 13.47.58.png")  

Hi [@Alex Koxaras _Relational_](/t5/user/viewprofilepage/user-id/4150197),  

Above screenshots are one with attachments and other one where it is failing to load preview. Could you please help me if I can get any suggestion to tweak any properties to get this done? Any help much appreciated  

Thanks,

Ramesh Kumar Tirumareddy


author: Alex Koxaras _Relational_
body: If you remove it and upload it again, it has the same behavior? If yes, the file could be corrupted.


author: ramesh kumar
body: Yes it behaves same even after reattaching it. Is it corrupted because of the way I uploaded? I can view that file by going into attachments section and hit on view button.


author: Andy Gladstone
body: [@ramesh kumar](/t5/user/viewprofilepage/user-id/4808100) have you tried dragging and dropping the attachment into the page? I see you are using the Rest API for these attachments. If you manually upload, does the same behavior continue?


author: ramesh kumar
body: Manually I did not tried but let me give a try and let you know


author: ramesh kumar
body: Yeah If I manually do an upload, I can view the attachment without any problem. But I want it to be a part of script so I want to upload that using curl in REST API

Can you please help me to achieve this?


author: Andy Gladstone
body: [@ramesh kumar](/t5/user/viewprofilepage/user-id/4808100) I am not too familiar with the REST API. However, here is link to the documentation where it applies to attachments. I believe your API call may need to be tweaked so the attachment comes through properly to allow the preview to work.

<https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/#api-wiki-rest-api-content-id-child-attachment-get>


author: Dalia El-Dib
body: Hi [@ramesh kumar](/t5/user/viewprofilepage/user-id/4808100), did you resolve your issue? I am facing the exact same issue here, curious to know if you identified the issue?  
Thanks!


Tags: cloud

confluence-cloud