Skip to content

docs: Prepare docs for fileupload editor #1524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

valekjo
Copy link
Member

@valekjo valekjo commented Apr 8, 2025

This PR should be merged once the feature is in Apify Console.

Related PRs

@valekjo valekjo requested review from mtrunkat and jancurn April 8, 2025 14:32
@github-actions github-actions bot added this to the 112th sprint - Console team milestone Apr 8, 2025
@github-actions github-actions bot added the t-console Issues with this label are in the ownership of the console team. label Apr 8, 2025
@jancurn
Copy link
Member

jancurn commented Apr 8, 2025

See apify/apify-shared-js#509 for the final name of the editor

valekjo added a commit to apify/apify-shared-js that referenced this pull request Apr 15, 2025
We want to add file upload to the input schema, decided to go with url
on the input.

Seems like a good idea to just use a special editor for this, instead of
adding a new input type. The default fallback editor should work
reasonably well everywhere.

### Related PRs:
 - apify/apify-docs#1524
@valekjo valekjo changed the title docs: Prepare docs for fileUrl editor docs: Prepare docs for fileupload editor May 5, 2025
@valekjo valekjo requested a review from MFori May 13, 2025 13:28
@valekjo valekjo marked this pull request as ready for review May 13, 2025 13:28
@valekjo valekjo requested a review from TC-MO as a code owner May 13, 2025 13:28
Comment on lines 226 to 235
Example of file selection using `fileupload` editor. The input is passed to the Actor as a string, it is up to the author to resolve the file or validate if it exists.

![Apify Actor input schema - fileupload input](./images/input-schema-fileupload-input.png)


The input allows the user to either provide a link or to upload the file as a record to a key-value store of their choosing.

![Apify Actor input schema - fileupload input options](./images/input-schema-fileupload-modal.png)


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Example of file selection using `fileupload` editor. The input is passed to the Actor as a string, it is up to the author to resolve the file or validate if it exists.
![Apify Actor input schema - fileupload input](./images/input-schema-fileupload-input.png)
The input allows the user to either provide a link or to upload the file as a record to a key-value store of their choosing.
![Apify Actor input schema - fileupload input options](./images/input-schema-fileupload-modal.png)
The `fileupload` editor enables users to specify a file as input. The input is passed to the Actor as a string. It is the author's responsibility to interpret this string, including validation of its existence and format.
![Apify Actor input schema - fileupload input](./images/input-schema-fileupload-input.png)
It could be a URL or a key-value store record identifier and manage the file content.
![Apify Actor input schema - fileupload input options](./images/input-schema-fileupload-modal.png)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I'm not sure about this phrase:

It could be a URL or a key-value store record identifier and manage the file content.

I was trying to explain that the UI makes it easier for users to upload a file to a key-value store, and that they can choose an existing store, or create a new one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, yeah I might have went a little overboard with this one, and create more confusion where it wasn't needed.

Let's go with something closer to original just slightly rephrased to avoid words like lets

The user provides either a URL or uploads the file to a key-value store (existing or new)."

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, thanks!

@valekjo valekjo requested a review from TC-MO May 16, 2025 07:38
Copy link
Contributor

@TC-MO TC-MO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one question, which may turn into further edit :D

@@ -223,11 +223,19 @@ The `anyDate` property renders a date picker that accepts both absolute and rela

![Apify Actor input schema - country input](./images/input-schema-date-both.png)

The `fileupload` editor enables users to specify a file as input. The input is passed to the Actor as a string. It is the author's responsibility to interpret this string, including validation of its existence and format.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question to clarify, does this mean Actor's author? or the Actor user? Reading it back now it's not entirely clear, maybe there is a better wording for this as well

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's easier for Actor user to provide a link to a file.

The Actor's author needs to deal with a string, that 🤞 , should be a link to a file. But it's the author's responsibility to check this (and handle the case when it's not).

Does that make sense?

@valekjo valekjo requested a review from TC-MO May 16, 2025 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-console Issues with this label are in the ownership of the console team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants