Forums

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

Copy/paste images from locally hosted site added them as links - can I change to local?

Mihai Tanasescu July 29, 2019

Hi there,

I managed to import what I had as markdown by converting it to HTML, starting a python webserver and then copying text and some of the images.
To my surprise the images were not uploaded to Confluence but rather links from my locally running server (localhost:8000/image-name.png).
Is there any way that I change that path for all the images (I have a lot) to something that would point to local attachments with the same name?
Uploading them will be a breeze compared to changing the "links".

Anyone ever run into this and has an easy solution for it?

 

Thanks,

Mihai

2 answers

1 accepted

0 votes
Answer accepted
Mihai Tanasescu August 3, 2019

I did it the lazy way:
- put the content in a file
- used sed to change the "ri" line

gsed 's/ri:url ri:value=\"http:\/\/localhost:8000\//<ri:attachment ri:filename=\"/g;'

- the ri page content-title was not needed

0 votes
Mihai Tanasescu July 29, 2019

Basically I need somehow (saw now with a source code editor) to change:
<ac:image ac:height="250">
<ri:url ri:value="http://localhost:8000/1563712284448.png"/>
</ac:image>

to 
<ac:image ac:height="250">
<ri:attachment ri:filename="1563712284448.png">
<ri:page ri:content-title="is this field needed??"/>
</ri:attachment>
</ac:image>

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events