veliovgroup / meteor-autoform-file

Upload and manage files with #autoForm
https://github.com/veliovgroup/Meteor-Files
Other
39 stars 17 forks source link

Problem with GridFS #12

Closed Obiwarn closed 7 years ago

Obiwarn commented 8 years ago

I use this in yogiben:admin with your sugegsted GridFS example code.

When I load an image in the edit document form it is displayed nicely.

But when I return to the same document the image is not displayed (however the String field is filled, so updating the image string seems to work).

dr-dimitru commented 8 years ago

(however the String field is filled, so updating the image string seems to work).

What is String filed? Please provide your code.

Obiwarn commented 8 years ago

I had to remove

if (Meteor.isServer) {
  Images.denyClient();
}

from the GridFS example.

Now it works fine.

@dr-dimitru Awesome packages by the way. Fantastic work! Thank you.

Obiwarn commented 8 years ago

Argh. The error still exists.

The table:

@AdminConfig =
  collections:
    Spots:
      icon: 'map-marker'
      color: 'yellow'
      tableColumns: [
        {label: 'Img', name: 'spotImage'}
        {label: 'Active', name: 'active'}
...
      ]

The Schema is:


Spots.schema = new SimpleSchema({
  active: {
    type: Boolean,
    defaultValue: true
  },
  spotImage: {
    type: String,
    autoform: {
      afFieldInput: {
        type: 'fileUpload',
        collection: 'SpotImages'
      }
    }
  },

  shortName: {
    type: String,
    unique: true
  },
...

Like this it works fine.

However when I remove the 'spotImage' column in the table (i.e. remove {label: 'Img', name: 'spotImage'} from AdminConfig), the image is not displayed anymore when I open the autoform for the schema (i.e. press edit document in the yogiben:admin table) .

dr-dimitru commented 8 years ago

Could you post what packages are you using? Whole .meteor/packages file

Obiwarn commented 8 years ago

# -------------------------
#  Meteor Packages
# -------------------------

force-ssl@1.0.13
accounts-base@1.2.14
accounts-password@1.3.1
coffeescript@1.11.1_2
email@1.1.18
underscore@1.0.10
fastclick@1.0.13
meteor-base@1.0.4
mobile-experience@1.0.4
mongo@1.1.14
blaze-html-templates@1.0.4
session@1.1.7
jquery@1.11.10
tracker@1.1.1
logging@1.1.16
reload@1.1.11
random@1.0.10
ejson@1.0.13
spacebars@1.0.12
check@1.2.4
reactive-var@1.0.11
http@1.2.10
accounts-ui@1.1.9
ecmascript@0.5.9

# -------------------------
#  Atmosphere Packages
# -------------------------

aldeed:collection2
chrismbeckett:fontawesome4
raix:handlebar-helpers
meteorhacks:unblock
useraccounts:bootstrap
miro:mailchimp
dburles:google-maps
alanning:roles
meteorhacks:npm
dburles:collection-helpers
harrison:papa-parse
iron:router
aldeed:autoform
rafaelhdr:google-charts
rajit:bootstrap3-datepicker
standard-minifier-css@1.3.2
standard-minifier-js@1.2.1
shell-server@0.2.1
momentjs:moment@=2.15.1
ostrio:files
ostrio:autoform-files
sacha:spin
fourseven:scss

# -------------------------
#  Local Packages
# -------------------------

yogiben:admin
yogiben:admin-settings
dr-dimitru commented 8 years ago

@obiwarn I've never faced yogiben:admin, but heard what currently it's incompatible with Meteor-Files. Or integration was very difficult.

Meanwhile let's reverse engineering this issue:

  1. Is this integration used to work before?
  2. Is issue appeared after GridFS integration?
  3. What happens if you use default Meteor-Files storage?
  4. Is there any errors/warnings? What debug mode says?
  5. Or this issue can be simply described as image is not displayed?
  6. Is image moved to the storage? Can you physically (via ssh/console/file browser) locate it?
dr-dimitru commented 7 years ago

@obiwarn any news from your end?

dr-dimitru commented 7 years ago

Closed due to silence at issue owner end.