Jump to content

How to replace uploaded files?

Recommended Posts

Posted (edited)

How do I replace uploaded PDF files? The Link Editor dialog is showing only 20 files. So how do I replace old files with new ones while still maintaining the same URL? In older squarespace versions, I was able to find the file, delete it, and then upload a new file with the same filename. This way, the URL didn't change and all links across my website to that file were maintained. Now, I have no way of doing this without changing every single link to the new URL of the newly uploaded file.

And Searching for a filename doesn't work either. The search only returns results from the 20 listed files.

Please help! 

Edited by Nicole_C
  • 4 months later...
  • 1 year later...
  • 1 month later...
  • 11 months later...
Posted

This didn't work for me. I deleted the original file, saved changes, and then went back in and uploaded the file with the same name, but Squarespace added a little four character hash after the file name, which messes up the links.

  • 2 months later...
Posted (edited)

There IS a solution!

FIRST, TO BE CLEAR ABOUT THE PROBLEM ...

When you upload a file it is stored in a certain "location" which has its own "static URL" (or unique address).

So, for example, if you upload a PDF (e.g. 'my test PDF.pdf') as a "linked file" it would have an address or URL something like this (notice spaces in the name of the file are replaced by '+' s) ... 

https://static1.squarespace.com/static/559fb5d6e4b0b8eb00f70a64/t/62cffc8d5c22873463703f6f/1657797774503/my+test+PDF.pdf

When people click on the link and the file opens (usually in a new Tab) this is the address/URL people see in their address bar.

But when you remove this file and then upload a file with the same name, it will have a slightly different address or URL ...

https://static1.squarespace.com/static/559fb5d6e4b0b8eb00f70a64/t/62cff2097cc7fc7cb944a60b/1657795082728/my+test+PDF.pdf

So if you give people the first address as a link (e.g. in an email or on social media or elsewhere), but then replace the pdf with a new version, the old link no longer works (as it points to the old version that is no longer there).

 

THE SOLUTION

Squarespace uses "shortcuts" to point to uploaded files. So the shortcut to the above file would be ...

https://yourwebsite.com/s/my-test-PDF.pdf

(Notice that the spaces in the file name are replaced here with '-' s)

You can use this link and give it out. Then, when you delete the original pdf and upload a new version, with exactly the same name, the same link will still work.

Where to get the shortcut link?

How to replace the file

  • Delete the original file
  • Upload a new version, with exactly the same name

 

WARNING

Do NOT upload two files with the same name - they will show in the list as the same, but the second will have some random extra characters added to distinguish it and the link will be something like this

https://yourwebsite.com/s/my-test-PDF-sqk.pdf

 

Hope that helps someone

Link to a file.jpg

 

Edited by ITsorted-Massimo
  • 1 month later...
Posted
8 minutes ago, theoB86 said:

Hello that doesn't work

If you'd like some help, please be a little more specific by including some more information. For more detail, please see How to Post a Forum Question.

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

  • 10 months later...
Posted
On 9/3/2022 at 7:01 AM, paul2009 said:

If you'd like some help, please be a little more specific by including some more information. For more detail, please see How to Post a Forum Question.

Hi Paul2009 and others,

I could really use help with this. 

We need the functionality of PDFs uploaded to our site being able to have revisions -- without creating a new URL.

For example, with google drive, one can "replace file" with a new version that maintains the same link. 

There does not seem to be that option with how Squarespace manages files.

What is the best workaround for this since we need this functionality?

Thank you!
Mackenzie

Posted (edited)
8 hours ago, hawkins13 said:

We need the functionality of PDFs uploaded to our site being able to have revisions -- without creating a new URL.

Two options you can use them alone or in combination depending on how you want your URLs to look.

Adding links to your site, see the Link to files section of the page.

URL redirects

Let us know how it goes.

Edited by creedon

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Posted
1 hour ago, creedon said:

Two options you can use them alone or in combination depending on how you want your URLs to look.

Adding links to your site

URL redirects

Let us know how it goes.

Thanks Creedon for your reply. 

What do you mean by adding links to your site?
 

Below is squarespace's help article on redirects for files. 

Can I change the file's URL?

No. Our content delivery network (CDN) assigns URLs automatically, and they can't be changed. To learn more, visit Image and file URLs in Squarespace.

https://support.squarespace.com/hc/en-us/articles/205813928

Note

It's not possible to customize or redirect a static asset URL.

Posted
Quote

What do you mean by adding links to your site?

One type of link that can be added to a site is a Link Page that can link to a file.

ScreenShot2023-07-07at4_17_30PM.thumb.png.19d2980a9cf5e1ab20ece497eb977155.png
 

Quote

 

Can I change the file's URL?

It's not possible to customize or redirect a static asset URL.

 

This is true but using URL Mapping you can redirect a URL that doesn't exists on your site to a URL such as a Link Page URL or a file on SS's CDN.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Posted
15 hours ago, hawkins13 said:

We need the functionality of PDFs uploaded to our site being able to have revisions -- without creating a new URL.

For example, with google drive, one can "replace file" with a new version that maintains the same link. 

Squarespace will maintain the same URL if you:

  • delete the old file before adding a new one
  • use the same filename (bear in mind that if a filename contains non-alphanumeric characters, they will be replaced/substituted)
  • use the version of the URL that includes your own domain name. For example, "https://yourdomain.com/yourfilename.pdf" instead of the URL that links directly to the CDN.

The URL containing "/s/" will automatically be redirected to the CDN URL of the file.

There's an earlier post in this thread that explains this in more detail but if anything is unclear, please post back.

Did this help? Please give feedback by clicking an icon below  ⬇️

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

  • 2 weeks later...
Posted

hi @paul2009 -- the version of the URL that includes own domain name does not seem to work -- with or without the /s/ (e.g. "https://yourdomain.com/yourfilename.pdf" or ""https://yourdomain.com/s/yourfilename.pdf")

is there another URL that points to the CDN and would be static?

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.