Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

"Page must be saved before you can upload files"

Started by Rob Walton 8 years ago · 3 replies · 543 views
8 years ago

I'm creating some pages and their primary role is to upload a file. I'm creating the pages via an 'add page' modal. Once the page is created I receive the message that the page must be saved before a file can be uploaded.

I'm wondering if there is a workaround for this? It would be nice to be presented with the file upload field straight after the page is created.

👍 2
8 years ago

I asked this on Slack on June 28 and unfortunately got no answer. Your need seems greater than mine. I can see the technical reasons for this limitation, though it's an annoying UX.

I can imagine creating a custom form field that stashes an uploaded file into a general media folder until the page is saved, when it is moved. If that can be done, it seems like a decent sized task. So basically I've got as far as having an idea for an algorithm.

Very interested to see if anyone else knows simpler way.

8 years ago

Thanks for the reply. I wondered if it would be possible to some way trigger a save after the page is created.

8 years ago

Yeah, you mean save after the initial modal dialog? There would need to be enough information to create a "skeletal" page. It might be because the blueprints could contain required fields that don't get populated if the user cancels. That's certainly another approach worth investigating for sure though.

If you want a knowledgeable answer from core developers, try submitting an issue in the Github repo and be sure to search first in case this has been raised before (think it may have been).

👍 1

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 56 13 hours ago
Support · by Anna, 3 days ago
2 61 16 hours ago
Support · by Justin Young, 17 hours ago
1 32 17 hours ago
Support · by Duc , 1 week ago
2 66 5 days ago
Support · by Colin Hume, 1 week ago
2 59 5 days ago