Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files fieldtype #6736

Merged
merged 11 commits into from
Sep 20, 2022
Merged

Files fieldtype #6736

merged 11 commits into from
Sep 20, 2022

Conversation

jasonvarga
Copy link
Member

@jasonvarga jasonvarga commented Sep 16, 2022

This PR adds a fieldtype to allow for file uploads that aren't intended to go into an asset container.

This is intended to be used in configuration forms, not content. It will be used in #4832 to be able to upload a new file.

It uses the ajax uploader interface used by the assets fieldtype.

Since our publish forms are all ajax and not really suited to handle file uploads, this will upload the file to a temporary location when you drop it into the fieldtype, submit the path, then you can use the path on the server and do what you need with the uploaded file.

There's a middleware that'll do garbage collection and those temporary files.

@jasonvarga jasonvarga changed the title File fieldtype File (system) fieldtype Sep 16, 2022
@jasonvarga jasonvarga changed the title File (system) fieldtype File fieldtype Sep 16, 2022
@jasonvarga jasonvarga changed the title File fieldtype Files fieldtype Sep 16, 2022
@jasonvarga jasonvarga marked this pull request as ready for review September 20, 2022 19:29
@jasonvarga jasonvarga merged commit d4b8a64 into 3.3 Sep 20, 2022
@jasonvarga jasonvarga deleted the feature/file-fieldtype branch September 20, 2022 19:30
schoen-dev pushed a commit to schoen-dev/cms that referenced this pull request Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant