Giter VIP home page Giter VIP logo

Comments (12)

dr-dimitru avatar dr-dimitru commented on July 17, 2024
  1. Have you checked the generated links by fileURL template helper?
  2. Can you locate files to confirm what they are uploaded and exists?

fileURL template helper is using __meteor_runtime_config__.ROOT_URL which is set from ROOT_URL env.var, see here

from meteor-files.

palpinter avatar palpinter commented on July 17, 2024
  1. Yes I generate links with fileURL, and I change the port only, so...
  2. Of course, if I change back the port number, all image visible again.

from meteor-files.

palpinter avatar palpinter commented on July 17, 2024

Maybe the collection definition wrong?

Images = new FilesCollection(
collectionName: 'images'
allowClientCode: false
storagePath: 'ak/images'
onBeforeUpload: (file) ->
# Allow upload files under 10MB, and only in png/jpg/jpeg formats
if file.size <= 10485760 and /png|jpg|jpeg/i.test(file.ext)
true
else
'Please upload image, with size equal or less than 10MB'
)

from meteor-files.

dr-dimitru avatar dr-dimitru commented on July 17, 2024
  1. Definition looks ok
  2. The link is changing? Port is not missed? Could you post the link?
  3. What output you're getting when passing __meteor_runtime_config__.ROOT_URL to browser's console?
  4. Have you tried to set debug to true, could you post here Server's output with debug option?

from meteor-files.

palpinter avatar palpinter commented on July 17, 2024

OK, this very strange.
I have two running system, the second rsynced from the first.
The first started with
ROOT_URL=http://palpinter.dlinkddns.com:3030 meteor --port 3030
The following (and all) picture is exist:
http://palpinter.dlinkddns.com:3030/cdn/storage/images/eAy8AJk5vYtmodWTi/original/eAy8AJk5vYtmodWTi.jpg
meteor_runtime_config.ROOT_URL is 'http://palpinter.dlinkddns.com:3030'

The second started with:
ROOT_URL=http://palpinter.dlinkddns.com:3060 meteor --port 3060
The same picture:
http://palpinter.dlinkddns.com:3060/cdn/storage/images/eAy8AJk5vYtmodWTi/original/eAy8AJk5vYtmodWTi.jpg
the result is: 'File Not Found :('
meteor_runtime_config.ROOT_URL is 'http://palpinter.dlinkddns.com:3060'

Both instance is absolutely identical. Everything works in the app except images.

And if the first started with 3060 port, and the second with 3030, the second will works, and the first wont.

from meteor-files.

palpinter avatar palpinter commented on July 17, 2024

You can access both of them now. There is english language version. You can select with flags in upper right corner.

from meteor-files.

dr-dimitru avatar dr-dimitru commented on July 17, 2024

From my end both urls returns 404 (may it be cache on your machine?):

  1. http://palpinter.dlinkddns.com:3060/cdn/storage/images/eAy8AJk5vYtmodWTi/original/eAy8AJk5vYtmodWTi.jpg
  2. http://palpinter.dlinkddns.com:3030/cdn/storage/images/eAy8AJk5vYtmodWTi/original/eAy8AJk5vYtmodWTi.jpg
  3. Are you sure those files is transferred via rsync?
  4. Have you checked permissions after transferring files via rsync? Try to run chmod -R 777 /path/to/uploaded/files

P.S. I'm off for today, I'll ping you tomorrow

from meteor-files.

palpinter avatar palpinter commented on July 17, 2024

OK, thanks.

from meteor-files.

palpinter avatar palpinter commented on July 17, 2024

OK, the problem not with FILE_URL at all. The real problem is when I restart meteor something delete all images in:
.meteor/local/build/programs/server/ak/images
directory.
The images came from cache by the way.

from meteor-files.

palpinter avatar palpinter commented on July 17, 2024

The problem is bigger than I thought.

Steps to reproduce:
git clone https://github.com/VeliovGroup/Meteor-Files
cd Meteor-Files/demo-simplest-upload
meteor npm install
meteor

upload a file
check .meteor/local/build/programs/server/assets/app/uploads/Images directory - file exist
restart meteor
check .meteor/local/build/programs/server/assets/app/uploads/Images directory - file doesnt exist

Now what should I do. Every restart delete all uploaded files

from meteor-files.

dr-dimitru avatar dr-dimitru commented on July 17, 2024

It's expected behaviour, that's why I asked you multiple times to check physical file existence.
Meteor rebuilds itself on dev-stage, and removes everything what not belongs to it.
Place storage folder outside of the .meteor directory, like /data/meteor/uploads/ and make sure it's writable for user used to run node/meteor command

from meteor-files.

palpinter avatar palpinter commented on July 17, 2024

OK, thank you. I'll try.

from meteor-files.

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.