Skip to content
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

New extension: UploadDownloadImageFile #1131

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

Description

Allows the upload of an image from the gallery, from a base64 string, and the download of images.

How to use the extension

Allows the upload of an image from the gallery, from a base64 string, and the download of images.

Content:

  • The action Upload image from gallery.
  • The action Load a base64 encoded image.
  • The action Download object image.

Do note that the object's resource is replaced with the picture, meaning that every object sharing the same resource as the receiver one will also display the picture.

Checklist

  • I've followed all of the best practices.
  • I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
  • I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.

What tier of review do you aim for your extension?

Community (Unreviewed)

Example file

UploadDownloadImageFileExample.zip

Extension file

UploadDownloadImageFile.json.zip

@github-actions github-actions bot requested a review from a team as a code owner December 27, 2023 16:47
@github-actions github-actions bot added the ✨ New extension A new extension label Dec 27, 2023
@arthuro555
Copy link
Member

Was this extension made with GDevelop? It doesn't have newlines, but extensions exported from GDevelop should be exported with the new lines...

@D8H
Copy link
Contributor

D8H commented Dec 28, 2023

Was this extension made with GDevelop? It doesn't have newlines, but extensions exported from GDevelop should be exported with the new lines...

The web version doesn't have the right parameters and it exports without any indentation.

@RebornOfc
Copy link

Was this extension made with GDevelop? It doesn't have newlines, but extensions exported from GDevelop should be exported with the new lines...

Yes it was made in GDevelop

@RebornOfc
Copy link

RebornOfc commented Jan 4, 2024

(Fixed the download file action to allow choosing the name)

!update UploadDownloadImageFile.json.zip

Copy link
Contributor Author

github-actions bot commented Jan 4, 2024

Can't update the extension, as it doesn't pass automatic tests:


❌ 1 Error found in extension 'UploadDownloadImageFile':

  ⟶ ❌ [JavaScript disallowed properties]: Found disallowed properties in extension 'UploadDownloadImageFile':
{
  allowedProperties: [
    'makeUuid',           'rgbToHex',
    'rgbOrHexToRGBColor', 'rgbToHexNumber',
    'hexNumberToRGB',     'hexToRGBColor',
    'copyArray',          'staticArray',
    'staticArray2',       'staticObject',
    'toDegrees',          'toRad',
    'random',             'randomFloat',
    'randomFloatInRange', 'randomInRange',
    'randomWithStep',     'evtTools',
    'Variable',           'RuntimeObject',
    'Logger'
  ],
  disallowedProperty: '_ExtensionUploadedImages',
  objectName: 'gdjs'
}


❌ 1 Error found in extensions - please fix it before generating the registry.

1 similar comment
Copy link
Contributor Author

github-actions bot commented Jan 4, 2024

Can't update the extension, as it doesn't pass automatic tests:


❌ 1 Error found in extension 'UploadDownloadImageFile':

  ⟶ ❌ [JavaScript disallowed properties]: Found disallowed properties in extension 'UploadDownloadImageFile':
{
  allowedProperties: [
    'makeUuid',           'rgbToHex',
    'rgbOrHexToRGBColor', 'rgbToHexNumber',
    'hexNumberToRGB',     'hexToRGBColor',
    'copyArray',          'staticArray',
    'staticArray2',       'staticObject',
    'toDegrees',          'toRad',
    'random',             'randomFloat',
    'randomFloatInRange', 'randomInRange',
    'randomWithStep',     'evtTools',
    'Variable',           'RuntimeObject',
    'Logger'
  ],
  disallowedProperty: '_ExtensionUploadedImages',
  objectName: 'gdjs'
}


❌ 1 Error found in extensions - please fix it before generating the registry.

@RebornOfc
Copy link

Now you can extract a base64 string out of an already existing object. Updated some descriptions.

!update UploadDownloadImageFile.json.zip

Copy link
Contributor Author

github-actions bot commented Jan 8, 2024

Can't update the extension, as it doesn't pass automatic tests:


❌ 1 Error found in extension 'UploadDownloadImageFile':

  ⟶ ❌ [JavaScript disallowed properties]: Found disallowed properties in extension 'UploadDownloadImageFile':
{
  allowedProperties: [
    'makeUuid',           'rgbToHex',
    'rgbOrHexToRGBColor', 'rgbToHexNumber',
    'hexNumberToRGB',     'hexToRGBColor',
    'copyArray',          'staticArray',
    'staticArray2',       'staticObject',
    'toDegrees',          'toRad',
    'random',             'randomFloat',
    'randomFloatInRange', 'randomInRange',
    'randomWithStep',     'evtTools',
    'Variable',           'RuntimeObject',
    'Logger'
  ],
  disallowedProperty: '_ExtensionUploadedImages',
  objectName: 'gdjs'
}


❌ 1 Error found in extensions - please fix it before generating the registry.

@RebornOfc
Copy link

Added so many things since 2 weeks ago

!update UploadDownloadImageFile.json

Copy link
Contributor Author

❗ An internal error has occurred. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/7603497732.

@RebornOfc
Copy link

RebornOfc commented Jan 26, 2024

The extension is ready, honestly the only thing missing is to make "Download file" work on mobile devices, here is the final build (ready to be implemented as community extension):

Note: I removed the namespace 'gdjs._ExtensionUploadedImages' because I found proper methods.

!update UploadDownloadImageFile.json

Oh, I forgot I have to make it a zip file

Copy link
Contributor Author

❗ An internal error has occurred. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/7672071381.

Copy link
Contributor Author

❗ An internal error has occurred. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/7672081300.

@RebornOfc
Copy link

RebornOfc commented Jan 26, 2024

!update UploadDownloadImageFile.json.zip

Copy link
Contributor Author

Can't update the extension, as it doesn't pass automatic tests:


❌ 2 Errors found in extension 'UploadDownloadImageFile':

  ⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'WriteBase64Image parameter 'Variable' has a dot, but it is forbidden there!
  ⟶ ❌ (🔧) [Dots in sentences]: Field 'description' of the function 'WriteImage parameter 'Variable' has a dot, but it is forbidden there!


❌ 2 Errors found in extensions - please fix them before generating the registry.

Copy link
Contributor Author

✅ Successfully updated the extension.

@jack-ii
Copy link

jack-ii commented Aug 20, 2024

@RebornOfc

  1. Looks like the image variable in the "Upload device image" action doesn't work, it's empty after upload.

  2. If I upload car.png in a spite, then change it with uploading dog.png, it is not possible to upload car.png again.

  3. The file-browser window often opens again after I have selected an image to upload by double-clicking it. Even if it is not in the same position like the button. It cannot be prevented with a timer.

Would be cool if it gets fixed and the extension becomes available in GD. It offers great functionality that has been waited for many years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ New extension A new extension
Projects
Status: Needs review
Development

Successfully merging this pull request may close these issues.

4 participants