Maintain URL for Image or Document after Replacement
Permalink
I have a client that would like to be able to send a link to a file uploaded into the file manager in an email campaign. They would like to then be able to update the file (replace) over time. I originally thought that replacing a file would keep the original URL but apparently it does not. They do not want to do a landing page... just the link to the file.
Is there any way to do this?
Thanks in advance.
C
Is there any way to do this?
Thanks in advance.
C
Ha! You make it sound like I know what I am doing :)
What would that look like? I've built addons but mostly by the beg borrow and steal method. I would definitely take a stab at it but Im not sure I would even know where to begin. Could it just be a block that you place on a particular hidden page that grabs the fID and spits out a 301 redirect?
Thanks for the response and any further thoughts.
C
What would that look like? I've built addons but mostly by the beg borrow and steal method. I would definitely take a stab at it but Im not sure I would even know where to begin. Could it just be a block that you place on a particular hidden page that grabs the fID and spits out a 301 redirect?
Thanks for the response and any further thoughts.
C
@Chrouglas
I can confirm that replaced files in the file manager have a new file path, but keep the same file ID. If the emails are created outside of concrete5, I am not sure how you would make use of a file ID.
A simple approach would be to have the client FTP into their site and upload an image into a folder that you specify. When they replace it, they rename their new image to "email_image.jpg" and overwrite the current image (the same filename is always used). This maintains a URL for the email campaign.
- /email_campaign/email_image.jpg
How often would these images be replaced?
In my initial reply, I was thinking that you could make a dashboard single page add-on. Files would be uploaded and saved outside of the concrete5 file manager. This would be done using regular PHP file functions and not concrete5's file methods.
I can confirm that replaced files in the file manager have a new file path, but keep the same file ID. If the emails are created outside of concrete5, I am not sure how you would make use of a file ID.
A simple approach would be to have the client FTP into their site and upload an image into a folder that you specify. When they replace it, they rename their new image to "email_image.jpg" and overwrite the current image (the same filename is always used). This maintains a URL for the email campaign.
- /email_campaign/email_image.jpg
How often would these images be replaced?
In my initial reply, I was thinking that you could make a dashboard single page add-on. Files would be uploaded and saved outside of the concrete5 file manager. This would be done using regular PHP file functions and not concrete5's file methods.
I'm am shocked to say this but... I built it and it friggin works. Begged, borrowed and stole but it works.
Would you have any interest in taking a look? Offer any feedback? I've never created a package before so...
One thing that I could not manage to do was to get the thumbnail image to display after selecting a file from the file manager but I can live without that.
Thanks for your help. I think your idea about the dashboard single page sparked a fire.
C
Would you have any interest in taking a look? Offer any feedback? I've never created a package before so...
One thing that I could not manage to do was to get the thumbnail image to display after selecting a file from the file manager but I can live without that.
Thanks for your help. I think your idea about the dashboard single page sparked a fire.
C
What about making an add-on that reads and writes an image to location outside of concrete5?