Giter Site home page Giter Site logo

Comments (8)

dm9876 avatar dm9876 commented on May 27, 2024

as a point of contrast. I have it working successfully. here is the field definition that I am using in my entries.yaml

photo:
      type: file
      label: Photo
      multiple: false
      destination: 'user/pages/images'
      accept:
        - image/*

from grav-plugin-flex-directory.

rhukster avatar rhukster commented on May 27, 2024

@Flibio what kinds of files are you trying to upload? The default is for images only unless you specify an accept: option.

from grav-plugin-flex-directory.

Flibio avatar Flibio commented on May 27, 2024

@rhukster: I attempted to upload a JPG file.

from grav-plugin-flex-directory.

rhukster avatar rhukster commented on May 27, 2024

can you try removing random_name to see if It makes any diff?

from grav-plugin-flex-directory.

Flibio avatar Flibio commented on May 27, 2024

That seems to have fixed it, thanks.

from grav-plugin-flex-directory.

rhukster avatar rhukster commented on May 27, 2024

It's weird though because I have tested that random filename stuff on my local and it worked fine. file is totally saved, of course the filename is random, so you have to iterate over the files and grab the name to use it.

from grav-plugin-flex-directory.

rhukster avatar rhukster commented on May 27, 2024

I just tested with random name and it works fine: my example config:

    custom_file:
      type: file
      label: Custom File
      random_name: true
      destination: 'user/data/flex-directory/assets'
      multiple: true

2017-03-20 at 4 51 pm

This is how it looks after save. Notice I have random filenames showing there after save.

from grav-plugin-flex-directory.

Flibio avatar Flibio commented on May 27, 2024

It actually seems to be working now, albeit with a different file. Perhaps the file was too large (3MB), would this plugin display an error if that was the case?

from grav-plugin-flex-directory.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.