Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 21 07:08
    torchsmith commented #812
  • Oct 04 06:22
    sebastianspiller opened #826
  • Sep 21 20:25
    Luvelnet closed #824
  • Sep 21 20:25
    Luvelnet commented #824
  • Sep 16 02:21
    s7dhansh closed #809
  • Sep 16 02:21
    s7dhansh commented #809
  • Sep 15 15:57
    jankapunkt commented #809
  • Sep 15 15:51
    jankapunkt commented #819
  • Sep 15 15:50
    jankapunkt closed #825
  • Sep 15 15:50
    jankapunkt commented #825
  • Sep 15 14:00
    dr-dimitru commented #825
  • Sep 15 13:59
    dr-dimitru commented #825
  • Sep 15 13:57
    dr-dimitru labeled #825
  • Sep 15 07:21
    jankapunkt opened #825
  • Sep 15 07:15
    jankapunkt commented #812
  • Sep 10 20:26
    dr-dimitru commented #824
  • Sep 10 18:47
    Luvelnet commented #824
  • Sep 10 18:25
    jankapunkt commented #824
  • Sep 10 18:24
    jankapunkt commented #824
  • Sep 10 18:11
    Luvelnet edited #824
kakadais
@kakadais
I still believe meteor is the best choice for indivisual or professional developers as well but there's a high language barrier to make an echo system for none-english country. I want to cool down this.
dr.dimitru
@dr-dimitru
@kakadais did you do that in terms or your education? Sorry, I didn't get it.
@kakadais speaking of MongoDB and GridFS performance there's huge room to improve starting from chunking support and ending with CDN
dr.dimitru
@dr-dimitru
@kakadais speaking of translations — I'm personally against translating coding/development related documentation, tutorials, etc. to other languages other than English.
This is happened historically — we (developers) write code in English (I know, there are few exceptions) it's very true for JavaScript, so there are no reasons to use any other language for its documentation. I believe no one would benefit from reading code and having const peremennaya = {/*...*/} instead of const variable = {/*...*/}
kakadais
@kakadais

@dr-dimitru This research paper was not for professional user and not the best performance environement as you said. Because the goal was not to prove 'This is the best approach to serve Multimedia files'. The goal was 'This has enough availability to be used'. It's slightly different.
So I didn't improve test environment to be good enough for the best performance as you said.

But in my next step, I'll improve it on the next paper to prove 'This is could be one of the best approach to serve Multimedia files'. Some old professors are not accept a new technology easy, and doubt it at the first time always, so I approach this really carefully.
Anyway if I want to make the environment to be fully best performance, then I might be need your great ideas and help, right? haha ;)
Maybe I should hire you with my poor limited research budget kkk ;)

kakadais
@kakadais

@dr-dimitru I'm not sure I understand clearly, but I wans't trying to translate 'the programming code', I'm just trying to translate the documents on the docs.meteor.com.
(Translate the codes? I know some country tried that things previously but I've never imagined that before :)

I think a lot of programmers cannot start the great platforms and technology because lack of native documents and native community.

I already tried to maintain some meteor community in my country for years, such as 'Meteor School' in facebook or 'Meteor Startup' as a startup company and teaching offline class(paid version and the pay was good actually ;)) and build such as native language github repo(https://github.com/codeasy-org/codeasy),
everything was failed. And I believe it's caused by Language Barrier.
They always leave to the Django or something and left a message 'can't find an information easy on the online'.. So painful situation for me.

I know maybe you can't understand, but that is huge limitation for some countries and especially I'm suffered as well because of my poor english ;) so I can't teach or recommend Meteor properly to my student or co-companies

So basically what I want is,
please open or add some functionality on docs.meteor.com to add translate documents pages.
There are a lot of people who wants to translate it for their native country people like me and the guy on the forums.

dr.dimitru
@dr-dimitru

@kakadais

but I wans't trying to translate 'the programming code',

me neither, I mean we as developers got to use English anyways when we write code, so it shouldn't be an issue to read and learn in English

please open or add some functionality on docs.meteor.com to add translate documents pages.

I go that clearly, I just have different point of view. I'm not against translation and local adaptation, I just don't see much of use in it, as again — we (developers) got to write code and document/annotate it in English

kakadais
@kakadais

Haha ;)
Alright, we have a different point of view.
I really understand what you're saying and agree it makes our life much easy.

But I believe that there's a lot of good developers or potentially good developers(students) still in the world without good English ability.
And especially this kind of special platform need to have low 'entrance' to study at the first time.
The other famous platforms are usually having their own communities and documents with their own native languages in many countries, so this kind of echo system makes the platform grow well.

I'm not sure you are English native people or not,
but I'm pretty sure that you'll write better documents even in the English version,
if you could understand this factor.
Even your documents are always clear and good enough for me ;)

Anyway, my question was 'Do you have some idea to translate the docs.meteor.com officially',
so I could say your answer could be 'I think it's not necessary.'
Right? haha-

dr.dimitru
@dr-dimitru
@kakadais since it's opensource — fork it, translate it, and deploy it to free again Galaxy hosting
kakadais
@kakadais
@dr-dimitru Yeah- I just wanted to make an language option on docs.meteor.com ;) Cheers-
distalx
@distalx
When I upload base64 string, would it store the image in the MongoDB itself or Images are still being stored on the server dir?
distalx
@distalx
Okay, I figured it out. it images are still getting stored on disk.
dr.dimitru
@dr-dimitru
Just got your message, yes, by default everything goes to disk, even with gridfs integration
bmartin1134
@bmartin1134
is it possible to upload directly to amazon s3, similar to slingshot. from the docs it seems like i need to upload to the server first
dr.dimitru
@dr-dimitru
@bmartin1134 no, not possible. Yes, got to upload to the server first.
thespacecowboys45
@thespacecowboys45
I am trying to create a gallery of uploaded images. I am stuck trying to iterate over all images and display the image on the page using the "imageFile.link" helper.
    'files': function() {
        console.log("files()");

        var files = Images.find({}).cursor;

        for (file in files) {
            console.log("FILE:",file);
            console.log("link = " + file.link());
        }


        return files;
and the Template:
<template name="files">
    <h1>Files:</h1>
    <ul>
    {{#each files}}
        <li>{{ name }} - {{ imageFile.link }} <textarea>{{ tostring this }}</textarea></li>
    {{/each}}
    </ul>
</template>
So, how am I properly to use the Images collection - I think I am missing something about how the collection differs from a "standard" mongo collection - it seems there are other functions built in : like "link()"
SO I'm trying to understand that aspect of it.
Hmm....reading this
dr.dimitru
@dr-dimitru
@thespacecowboys45 .find() would return filesCursorhttps://github.com/veliovgroup/Meteor-Files/wiki/FilesCursor
Template.files.helpers({
    files() {
        console.log("files()");

        var files = Images.find({});

        for (file in files.fetch()) {
            console.log("FILE:",file);
            console.log("link = " + file.link());
        }


        return files;
<template name="files">
    <h1>Files:</h1>
    <ul>
    {{#each files.each}}
        <li>{{ name }} - {{ link }} <textarea>{{ tostring this }}</textarea></li>
    {{/each}}
    </ul>
</template>
thespacecowboys45
@thespacecowboys45
I ended up with this:
Template.files.helpers({
    'files': function() {
        var files = Images.find({}, { sort: { _id: 1 }}).cursor;

        return files;
    },
and
<template name="files">
    <h1>Files:</h1>
    <button>Click me</button>
    <ul>
    {{#each files}}
        <li>{{ name }} - {{ imageLink _id }} - <img class="size_thumb" src="{{ imageLink _id }}" /> <textarea>{{ tostring this }}</textarea></li>
    {{/each}}
    </ul>
</template>
and then another helper function to lookup and return the FileCursor :::
    imageLink(id) {
        console.log("imageLink for: " + id);
        path = Images.findOne({_id:id}).link();
          return path;
    },
dr.dimitru
@dr-dimitru
@thespacecowboys45 looks a little overcomplicated with .findOne() method call, which is unnecessary
kakadais
@kakadais

I think I understand what @thespacecowboys45 says.

The document explains the usage,

Images.collection.find({}).forEach(function (fileRef) {
  Images.link(fileRef);
});

And I used to get the links in cursor something like this to be clear for my co-workers (not familiar on this library).

Images.collection.find({}).forEach(function (fileRef) {
  Images.findOne(fileRef._id).link()
});

But it could be better and clear if we could get a link on fileRef or cursor directly.

Images.collection.find({}).forEach(function (fileRef) {
    fileRef.link()
});

I know there would be proper reason not to be accomplished this,
but I still think that would be good to be understood for new people.

Could it be?
Cheer up man - haha ;)

dr.dimitru
@dr-dimitru

But it could be better and clear if we could get a link on fileRef or cursor directly.

And you can:

Images.collection.find({}).each(function (fileCursor) {
    fileCursor.link()
});

And I used to get the links in cursor something like this to be clear for my co-workers (not familiar on this library).

Better to add reference to the docs right in the in-code docs, than running expensive .findOne

kakadais
@kakadais
Do you suggest this way?
each() returns cursor array and there's no callback.
Images.find().each().forEach (cursor) -> cl cursor.link()
kakadais
@kakadais
I realize forEach contains object, and Meteor collection forEach as well.
But I suggest that it would be great if the object contains the link or link() method in the object just like a data if it's possible-
Malte Engelhardt
@kurvenschubser1_gitlab
Hi, I'd like to insert zip files generated on the server side to a Meteor-Files collection, but I get an error that 'CaseFiles.insert is not a function'. Is this by design? But how do you save a file on the server?
dr.dimitru
@dr-dimitru
@kurvenschubser1_gitlab .insert() (e.g. upload) is Client only method. Look at .addFile() and .write() Server-only methods
Malte Engelhardt
@kurvenschubser1_gitlab
@dr-dimitru Works great, thanks a bunch!
kakadais
@kakadais

@dr-dimitru Hello

I'm participating on Meteor Hackaton with Meteor-Files.

I built a cloud service to store files with the key of each user, and they can upload the files and get a accessable link with the atmosphere package.

So new player doesn't need to understand Meteor-Files at the first time and they could use this Meteor-Files with 3months and 300k and 10000 access/day limits.

Then they can slightly migration their service for their own server.

And they can setup their own cloud service on their server additionally they can get the dump file they were using on the cloud service, so they can setup

The usage likes,

import {Files} from "meteor/meteor-files-service";
Files.key = '3acKWbb742j2XqFcB' //replace with your key
...
Template.name.events({
  'change #file'(event, instance) {
    let file;
    if (file = event.currentTarget?.files[0]) {

      Files.insertFile(file, (err, rslt) => {
        if (err) alert(err)
        else links.insert(rslt);
      });

      event.currentTarget.value = ''
    }
  },
});

I think your package recommend to use Client insert and pub/sub find actions by the _id, but I need to get a link after Client insert finished in this case.

I could make a link with url and _id after afterUpload handler, but this approach doesn't look good enough.

Is there a way to get a link after Client insert file and after file prepared to downloads?

kakadais
@kakadais
image.png
The cloud service likes this simple. get a key and check the limits and dump.
Any advise would be great and appreciate-
dr.dimitru
@dr-dimitru
@kakadais just check the pattern how URL is generated it has static structure + _id of the file, which is available right after upload started. Let me know if you need more info
kakadais
@kakadais
Actually I did it already. But I thought that it would has some interval to be finished the upload and preparing service. Can I say that afterUpload would be the handle which is prepared to service the file?

This all thing is just for students or newbies for meteor to use files easy. So everything should be simple and light.

They can start or prototype with this package to upload files and change the cloud service to their local service later. Then there wouldn't be any code changes for them.

There's three repo for cloud-service / api / examples. I'll invite if you have any interest on this-

Thank you for your advise-

dr.dimitru
@dr-dimitru
@kakadais use afterUpload event/hook to add meta.isUploaded: true to file's object (or any other object)
kakadais
@kakadais
So after afterUpload handler, we can say that it's done. Thanks for help-
dr.dimitru
@dr-dimitru
@kakadais
👍