Closed bgantick closed 6 years ago
See disabledFileKey
here:
https://github.com/punkave/uploadfs
This renames stuff that's in the trash, which would free up redirects.
If we make this part of what apostrophe-cli sets up for a new site, we'll have this licked for new sites.
For existing sites we'd need to create a migration tool that does not yet exist.
But once we do that we get clean content syncs with no "permission denied" for files in the trash as a fringe benefit.
On Thu, May 10, 2018 at 10:24 AM, Brian Gantick notifications@github.com wrote:
Assigned #10 https://github.com/apostrophecms/apostrophe-redirects/issues/10 to @boutell https://github.com/boutell.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/apostrophecms/apostrophe-redirects/issues/10#event-1619892977, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB9fdpeIEeAWvAWEE1rL_pBC2ag7Yyoks5txE22gaJpZM4T5-gN .
--
THOMAS BOUTELL, CHIEF SOFTWARE ARCHITECT P'UNK AVENUE | (215) 755-1330 | punkave.com
There is now a practical path to fix this:
npm update
'apostrophe-attachments': {
uploadfs: {
disabledFileKey: 'very-random-string-please-not-this'
}
}
Deploy as usual. (Please note: I put these steps in this order for reasons)
On the server, run this task to complete the transition:
node app apostrophe-attachments:migrate-to-disabled-file-key
Now files in the trash have their names changed rather than their permissions changed. Recommend verifying an example.
BENEFITS
You can now sync down without permissions nonsense! Woo
You can now create a redirect for the old URL of the file, because the file ain't there no more.
Brand-new punkave projects (created today from our client-boilerplate) should be good to go out of the box. You need to npm install -g apostrophe-cli
though.
Should disabledFileKey
be documented in the apostrophe-attachments
docs page? I could do that if so.
I think a HOWTO would make the most sense. We also have this happening by default in client-boilerplate for new projects.
On Tue, May 29, 2018 at 4:12 PM, Alex Bea notifications@github.com wrote:
Should disabledFileKey be documented in the apostrophe-attachments docs page? I could do that if so.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/apostrophecms/apostrophe-redirects/issues/10#issuecomment-392927735, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB9fYCxZKuv_heozGVKfRz0LLwWQraXks5t3ausgaJpZM4T5-gN .
--
THOMAS BOUTELL, CHIEF SOFTWARE ARCHITECT P'UNK AVENUE | (215) 755-1330 | punkave.com
Cause: Files served directly by nginx before redirects happen
Possible Solution: This probably won't be solved in this module. I think we need to do one/both of these things: