Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Macro 'view-file' did not work when inserting attachment into page with Rest API

Jet Wu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 1, 2020

I created an attachment for a page with Rest API. And then I update this page to insert the attachment with Rest API. This attachment can be loaded in the page but its file name cannot display. Does anyone know how to resolve the problem? Below is the code I used to update page content.question.png

1 answer

0 votes
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 18, 2020

Hello @Jet Wu !

As I understand, an uploaded file title shows as a number in the embed view of it.

With this behavior in mind, I would like to ask you a few questions. Here we go:

  1. Is the affected file listed in the attachment page?
  2. What happens if you add the same attachment to the page body via user interface?
  3. Is this affecting all file types?
  4. What happens if you click the embed file in the page body?

I have found two threads that may aid your case. One of them deals with content update and the other one more closely matches your case to add attachments to the page body. Here they are:

 Also, here is our documentation on REST API and content manipulation:

Let us hear from you!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events