Always reload page after Files.insert()?
See original GitHub issueI base on Meteor + Vue.
- Meteor 1.7.0.5
 - Files 1.10.2
 
const Files = new FilesCollection({
  storagePath: () => {
    return `${Meteor.absolutePath}/fileUploads` // project path
  },
  collectionName: 'app_files',
})
// Vue tmp
<p>
      <img
        :src="filePreview"
        width="120px"
        height="125px"
      />
      <input
        ref="fileUploadHidden"
        type="file"
        accept="image/*"
        style="display: none"
        @change="filePicked"
      >
    </p>
    <el-button
      type="default"
      @click="pickFile"
    >Select file</el-button>
    <el-button
      type="primary"
      @click="uploadFile"
    >Upload file</el-button>
-----------
// Vue method
    uploadFile() {
      if (this.fileUpload) {
        Files.insert({
          file: this.fileUpload,
          streams: 'dynamic',
          chunkSize: 'dynamic',
          onUploaded(err, fileObj) {
            console.log('Upload', fileObj)
            if (err) {
              Notify.error({ message: 'File upload is error' })
            } else {
              Notify.success({ message: 'File upload is success' })
            }
          },
        })
      } else {
        Notify.error({ message: 'File upload is required' })
      }
    },
I tried to use @click.prevent="pickFile", still reload.
Please help me.
Issue Analytics
- State:
 - Created 5 years ago
 - Comments:9 (3 by maintainers)
 
Top Results From Across the Web
Always reload page after `Files.insert({...})` of `ostrio:files`?
I base on Meteor + Vue . It always reload page after Files.insert() . ```js const Files = new FilesCollection({ storagePath: () =>...
Read more >One time page refresh after first page load - Stack Overflow
To refresh a page once each time it opens use: ... "reloadPage();" function in somewhere in your js file page will only be...
Read more >How to Automatic Refresh a web page in fixed time
Approach 1: One can auto refresh the webpage using the meta tag within the head element of your HTML using the http-equiv property....
Read more >How to Reload the Page | HTML Goodies
Most people know it can be done by hand by holding the shift key and clicking the “Refresh” (on IE) or “Reload” (on...
Read more >Basic Features: Fast Refresh - Next.js
Next.js' Fast Refresh is a new hot reloading experience that gives you instantaneous feedback on edits made to your React components.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Very thanks again. It work fine 👍
@thearabbit read about navigation in Unix-like systems
I don’t know your particular environment, all paths in my examples are pseudo-paths
Create
/data/uploads: