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.

Timestamp of image upload is missing, unclear documentation on how to add it myself.

See original GitHub issue

Use case: Unable to sort images by upload date client side.

Suggestion: Track upload date server side and include in db, and serve with Image object client side.

Documentation is missing: How to manually add properties to an image server side (transform object during upload)

It is not clear to me if it is appropriate to add properties to a file in the onBeforeUpload hook server side (examples are only explicit about how to call other functions, not about how to transform the file).

Documentation is hard to find: How to manually add properties to an image client side (transform object during upload) (things like user ID, other relevant info) /docs/addFile.md

I looked at the Insert api with onStart, but no example is linked from this page: /wiki/Insert-(Upload). It would be nice if the insert api row where meta is listed referenced via link /docs/addFile.md.

Requests:

  1. Can a server side UTC automatic timestamp on upload be added to the lib by default? This is essential, common, expected functionality.
  2. Can you tell me how to add this myself (transform an image server side before upload)?
  3. Can you document this (more explicitly with an example if it can be done) and in an obvious place? Other libraries usually dedicate a main section of the introduction to transforming objects along with the other major points in the typical pipeline (installation, configuration (storage and options), uploading (from dom/js), retrieving (in dom/js), downloading, transforming, post-processing).

Actually, it would be nice if the main page had those main sections with massive bold titles…

Related Evidence: https://github.com/VeliovGroup/Meteor-Files/issues/459 You can see here another used had this use case, and had trouble determining how to do it. Although the meta object is how to add client-side attributes, and it is not obvious in docs how/when to add things to meta. Also, I would like to add server side UTC timestamps…not client side JS timestamps that may be completely incorrect or faked by a user.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
FEA5Tcommented, Mar 18, 2018

FYI:

onInitiateUpload(file) {
	file.createdOn = new Date().getTime();
},
0reactions
FEA5Tcommented, Mar 18, 2018

Have you paid for this software?

  1. A user is a customer whether they pay or not (see facebook, instagram, every free product).
  2. I donate to projects I use often, and will not ever be supporting this one.

You are welcome to ignore all feedback from all your users, but in the end it will only hurt you. Some individuals just do not take feedback well I suppose, sad to see you become so defensive over your inability to take feedback.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Add a Date Stamp to Your Photos - Finding the Universe
A detailed guide to adding or removing a date stamp, watermark, or other text to any image. Includes in-camera options as well as...
Read more >
How to upload images to Firebase web v9 using reactjs
This version work for me. import { collection, addDoc, serverTimestamp, doc, setDoc } from "firebase/firestore"; import ...
Read more >
Why does Google Photos change the dates of my pictures to ...
There is always a reason for the date that photos uploaded to Google Photos are showing. First, if you check the timestamp and...
Read more >
How to Quickly Fix Image Upload Issues in WordPress
Click on the Info tab and select the Server section, and you'll be able to find your server details. You can update the...
Read more >
Programmatically Uploading Images, Videos, and Other Files
The public ID value for image and video asset types should not include the file extension. If you include a . character in...
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