Comments (12)
- Have you checked the generated links by
fileURL
template helper? - 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.
- Yes I generate links with fileURL, and I change the port only, so...
- Of course, if I change back the port number, all image visible again.
from meteor-files.
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.
- Definition looks ok
- The link is changing? Port is not missed? Could you post the link?
- What output you're getting when passing
__meteor_runtime_config__.ROOT_URL
to browser's console? - Have you tried to set
debug
totrue
, could you post here Server's output with debug option?
from meteor-files.
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.
You can access both of them now. There is english language version. You can select with flags in upper right corner.
from meteor-files.
From my end both urls returns 404 (may it be cache on your machine?):
- http://palpinter.dlinkddns.com:3060/cdn/storage/images/eAy8AJk5vYtmodWTi/original/eAy8AJk5vYtmodWTi.jpg
- http://palpinter.dlinkddns.com:3030/cdn/storage/images/eAy8AJk5vYtmodWTi/original/eAy8AJk5vYtmodWTi.jpg
- Are you sure those files is transferred via rsync?
- 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.
OK, thanks.
from meteor-files.
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.
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.
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.
OK, thank you. I'll try.
from meteor-files.
Related Issues (20)
- ENOENT: no such file or directory, mkdir HOT 18
- onBeforeUpload and other functions should be able to be asynchronous HOT 1
- Custom Endpoint for MinIO ? HOT 2
- What defines the filename of the saved file? HOT 2
- Async support HOT 23
- [FilesCollection.ServiceFile] Path "/assets/app/uploads/ServiceFileCollection" is not writable! HOT 2
- How to change item metadata before it is inserted into the collection? HOT 9
- How do I update a filesCollection after Server side Write created? HOT 1
- Get user ip on upload HOT 9
- Since Meteor 2.11 - Exception in setTimeout callback: TypeError: fs.remove is not a function HOT 9
- Question: Can you store directly in GridFS? HOT 2
- Question: Save link in database?
- Update aws-sdk to v3 in 'Use AWS:S3 As Storage' Documentation HOT 4
- Files.load -> options.fileName is not in filepath HOT 2
- FilesCollection.find(...).each() not working properly? HOT 1
- HTTP uploads not working, multi-instance/cluster environment NGINX balanced HOT 5
- onAfterUpload not throwing error in uploader.on('end') HOT 5
- Cannot stream a video with filenames longer than 80 characters HOT 1
- wrong custom error message when using HTTP
- Make Meteor-Files compatible with meteor-desktop? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-files.