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

Problems with the 'upload' field #1

Closed
kroegerama opened this issue Aug 6, 2015 · 2 comments
Closed

Problems with the 'upload' field #1

kroegerama opened this issue Aug 6, 2015 · 2 comments
Labels

Comments

@kroegerama
Copy link

(This issue was in the admin-plugin at first. I was told to move it here)

I have defined the following in the blueprints file of my theme (/user/themes/mytheme/blueprints/default.yaml) to add a new tab "Downloads" to each page's admin panel:

form:
  fields:
    tabs:
      type: tabs
      active: 1
      fields:
        downloads:
          type: tab
          title: Downloads
          fields:
            downloads:
              type: section
              title: Downloads
              underline: true
            header.downloads:
              type: list
              label: Downloads
              fields:
                .title:
                  type: text
                  label: Title
                  default:
                  validate:
                    required: true
                .file:
                  type: upload
                  label: File
                .icon:
                  type: text
                  label: Icon
                  default:
                  validate:
                    required: false

This works fine and the new tab is displayed. However, if I click on "save", the file won't upload and the page header contains:

file: 'C:\fakepath\test.bin'

The fakepath part is a security feature of Chrome. Grav should only use the last part of the filename.

@rhukster rhukster added the bug label Aug 6, 2015
@rhukster
Copy link
Member

rhukster commented Aug 6, 2015

Upload field definitely needs looking at.

@rhukster
Copy link
Member

rhukster commented Dec 2, 2015

Closing this as we now have added a new file field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants