question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The link of files while streaming is misbehaving when server is restarted

See original GitHub issue

Here is the explanation of the issue I ma facing:

  • I am using the {{HelperFunction.link}} method to stream files on Client side. The problem is when the server is restarted this function returns a link but the link is not pointing to the desired file. The app is not deployed and the MongoDB and Meteor app are both running on localhost. Moreover when I use different device on the same network to access the app, I face the same issue. Is there another way to show or access the file, maybe by using the data="" property of html tags.
  • I am unable to retrieve ostrio:files package version
  • Meteor v2.1
  • Windows(Microsoft Edge v89.0.774.68)
  • I think this is an issue with the link. I had like to know if we can retrieve the file in form of Data

Shared

const ImageSchema = Object.assign({}, FilesCollection.schema, {
    timestamp: {
        type: Number,
        optional:true,
    },
    username: {
        type: String,
        optional:true,
    },
    chatRoomsID: {
        type: String,
        optional: true
    }
  });
Images = new FilesCollection({
    collectionName: 'Images',
    schema: ImageSchema
  });
Images.collection.attachSchema(new SimpleSchema(ImageSchema));

Client Side

HTML

<img src="{{imageFile.link}}" alt="{{name}}" style="width: 100%; height: 300px;">

Client JS

Template.chatroomid.onRendered(function(){
imageFile() {
         Meteor.subscribe('Images');
      }
});
Template.chatroomid.helpers({
imageFile() {
        return Images.findOne({_id:`${this._id}`});
      }
});

Server Side

Meteor.publish('Images', function tasksPublication() {
    return Images.find().cursor;
  });

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
GSYamajicommented, Apr 16, 2021

Thank you very much @dr-dimitru. You were very helpful and the issue was resolved

0reactions
dr-dimitrucommented, Apr 16, 2021

@GSYamaji Feel free to close it in case if the issue is solved on your end.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Media streaming turns off during reboot - Microsoft Community
1. On your search, type "services. · 2. Look for Windows Media Player Network Sharing Service > Right click and select Properties ·...
Read more >
Won't Read Hard Drives and the Network Shares Stop after a Minute ...
My issue is not that it won't play a certain file type, it is that both the old device and a brand new...
Read more >
RTC Connecting Discord – How to Fix the Server Error
3 of the fixes involve your computer network settings, while the remaining 2 happen right in your Discord app.
Read more >
Server breaks on OVT connection loss · Issue #355 - GitHub
The setup is OBS -> rtmp -> OME origin -> OVT -> OME edge -> HLS ... Or will the stream recover when...
Read more >
How to Fix It When Google Chrome Is Not Responding - Lifewire
Reset Chrome to default. It's always possible something was corrupted, or the combination of settings caused a problem. The only way to know...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found